Message1928

Author cgroves
Recipients
Date 2007-09-25.16:36:55
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Ahh, I was assuming code similar to what you added to PyObject was already in PyInstance.  If it wasn't there, unicode(obj) wouldn't call obj.__unicode__ if obj was a classic class.  Guess I shouldn't have assumed that worked.  I fixed that in r3542 and your test case works.  All instances of Python classes are actually instances of PyInstance in the Jython runtime,  so by adding that __unicode__ lookup there, it correctly calls the method.

This may actually explain why someone added the descriptor in the first place.  They didn't understand the PyInstance to Python object instance mapping and were trying to get __unicode__ visible on Python classes.  I'm grasping at straws here though.

Thanks for tracking this down!
History
Date User Action Args
2008-02-20 17:18:02adminlinkissue1800378 messages
2008-02-20 17:18:02admincreate