Seite 2 von 2

Verfasst: Freitag 30. Januar 2009, 20:16
von str1442
Achja:
Irgendwo muss ja Schluss sein, sonst würde man von __call__ zu __call__ springen.

Code: Alles auswählen

>>> class A(object):
...  def test(self): pass
... 
>>> a = A()
>>> a.test.__call__
<method-wrapper '__call__' of instancemethod object at 0xb7d7202c>
>>> a.test.__call__.__call__
<method-wrapper '__call__' of method-wrapper object at 0xb7d89d4c>
>>> a.test.__call__.__call__.__call__
<method-wrapper '__call__' of method-wrapper object at 0xb7d89e4c>
>>> a.test.__call__.__call__.__call__.__call__()
>>> 
:D