This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oren-sf
Recipients
Date 2002-02-09.21:40:56
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Python code and builtin functions don't have a 
consistent view of new style objects when method 
attributes are assigned:

class A(object):
   def __repr__(self):
      return 'abc'

a = A()
a.__repr__ = lambda:'123'

Result: repr(a) != a.__repr__()

The repr() function sees the original __repr__ method 
but reading the __repr__ attribute returns the 
assigned function.  With classic objects both cases 
use the assigned method.


History
Date User Action Args
2007-08-23 13:59:10adminlinkissue515336 messages
2007-08-23 13:59:10admincreate