Message8252

Author dooble
Recipients dooble
Date 2014-03-15.01:17:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1394846230.34.0.525585299336.issue2118@psf.upfronthosting.co.za>
In-reply-to
Content
struct.Struct is a class, but exposed by jython as a function, which is inconsistent with CPython.

latest revision Jython:

Jython 2.7b1+ (, Mar 14 2014, 20:46:52)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_45
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> type(struct.Struct)
<type 'reflectedfunction'>
>>> class Example(struct.Struct): pass
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Error when calling the metaclass bases
    reflectedfunction(): expected 1 args; got 3
>>>


CPython 2.7.6:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> type(struct.Struct)
<type 'type'>
>>> class Example(struct.Struct): pass
...
>>>
History
Date User Action Args
2014-03-15 01:17:10dooblesetrecipients: + dooble
2014-03-15 01:17:10dooblesetmessageid: <1394846230.34.0.525585299336.issue2118@psf.upfronthosting.co.za>
2014-03-15 01:17:09dooblelinkissue2118 messages
2014-03-15 01:17:07dooblecreate