[Python-Dev] New Super PEP

Jim Jewett jimjjewett at gmail.com
Sun Apr 29 22:31:33 CEST 2007


Phillip J. Eby wrote:

> a __call__ method, it will still be
> called, even if you override __getattribute__ to return something else

  >>> dc = DoubleCall()
  >>> dc()
 'called!'
  >>> dc.__call__()
 'attribute'

That is sufficiently fragile that I would be uncomfortable with a
feature that couldn't be supplied otherwise.

-jJ


More information about the Python-Dev mailing list