Message3545

Author brosner
Recipients brosner
Date 2008-09-13.22:37:48
SpamBayes Score 8.403075e-07
Marked as misclassified No
Message-id <1221345468.91.0.218321152244.issue1131@psf.upfronthosting.co.za>
In-reply-to
Content
It appears the repr implementation is not 100% compliant with CPython.

brian@brosner-osx master [~/Development/jython]
$ jython
Jython 2.5a3+ (unknown:exported, Sep 13 2008, 16:25:22) 
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_03-p3
Type "help", "copyright", "credits" or "license" for more information.
>>> class FormMetaclass(type):
...     def __new__(cls, name, bases, attrs):
...         return super(FormMetaclass, cls).__new__(cls, name, bases, 
attrs)
... 
>>> class Form(object):
...     __metaclass__ = FormMetaclass
... 
>>> Form
<__main__.FormMetaclass object at 1>
>>>

brian@brosner-osx [~]
$ python
Python 2.5.1 (r251:54863, Feb  4 2008, 21:48:13) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class FormMetaclass(type):
...     def __new__(cls, name, bases, attrs):
...         return super(FormMetaclass, cls).__new__(cls, name, bases, 
attrs)
... 
>>> class Form(object):
...     __metaclass__ = FormMetaclass
... 
>>> Form
<class '__main__.Form'>
>>>

It appears that Jython uses type() in this case.
History
Date User Action Args
2008-09-13 22:37:48brosnersetrecipients: + brosner
2008-09-13 22:37:48brosnersetmessageid: <1221345468.91.0.218321152244.issue1131@psf.upfronthosting.co.za>
2008-09-13 22:37:48brosnerlinkissue1131 messages
2008-09-13 22:37:48brosnercreate