[issue12548] Add suport native Functor

Ezio Melotti report at bugs.python.org
Thu Jul 14 13:24:15 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

Using the func%(args) syntax is not possible because
fab = foo%(1,2)
is equivalent to
fab = foo.__mod__((1,2))

It might actually be possible to overload the % operator to make something that looks like your proposed syntax (without changing the actual Python syntax), but it still look hackish to me.
(We are also moving away from the % overload used by strings for the formatting in favor of the .format() method.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12548>
_______________________________________


More information about the Python-bugs-list mailing list