Message3114

Author JP
Recipients JP
Date 2008-04-02.14:37:16
SpamBayes Score 0.041940194
Marked as misclassified No
Message-id <1207147037.37.0.697522020554.issue1019@psf.upfronthosting.co.za>
In-reply-to
Content
jython trunk (as of 4271 on java 1.6 on ubuntu feisty) behaves
differently from cpython when the __name__ attribute of a new-style
class is set.

cpython:
Python 2.5.1 (r251:54863, Mar  7 2008, 03:19:34) 
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class F(object):
...     pass
... 
>>> F
<class '__main__.F'>
>>> F.__name__
'F'
>>> F.__name__ = 'P'
>>> F
<class '__main__.P'>
>>> F.__name__
'P'

jython:
Jython 2.3a0 on java1.6.0
Type "copyright", "credits" or "license" for more information.
>>> class F(object):
...     pass
... 
>>> F.__name__
'F'
>>> F.__name__ = 'G'
>>> F.__name__
'F'
>>> F
<class '__main__.F'>
History
Date User Action Args
2008-04-02 14:37:17JPsetspambayes_score: 0.0419402 -> 0.041940194
recipients: + JP
2008-04-02 14:37:17JPsetspambayes_score: 0.0419402 -> 0.0419402
messageid: <1207147037.37.0.697522020554.issue1019@psf.upfronthosting.co.za>
2008-04-02 14:37:17JPlinkissue1019 messages
2008-04-02 14:37:16JPcreate