Message3545
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. |
|
Date |
User |
Action |
Args |
2008-09-13 22:37:48 | brosner | set | recipients:
+ brosner |
2008-09-13 22:37:48 | brosner | set | messageid: <1221345468.91.0.218321152244.issue1131@psf.upfronthosting.co.za> |
2008-09-13 22:37:48 | brosner | link | issue1131 messages |
2008-09-13 22:37:48 | brosner | create | |
|