Message6743

Author pekka.klarck
Recipients pekka.klarck
Date 2011-12-14.12:20:22
SpamBayes Score 0.00011774518
Marked as misclassified No
Message-id <1323865223.14.0.159755001702.issue1828@psf.upfronthosting.co.za>
In-reply-to
Content
There are some problems when inheriting from Jython. What I've noticed is that Jython adds 'L' at the end of the string representation and crashes for bool().

To reproduce:

1) Assume we have a file with this content:

    class X(long):
        pass

    print 42, X(42)
    print bool(42), bool(X(42))


2) Run with Python (tested with 2.5-2.7):

    42 42
    True True


3) Run with Jython (tested with 2.5.1 and 2.5.2):

    42 42L
    True
    Traceback (most recent call last):
      File "test.py", line 6, in <module>
        print bool(42), bool(X(42))
    RuntimeError: maximum recursion depth exceeded
History
Date User Action Args
2011-12-14 12:20:23pekka.klarcksetrecipients: + pekka.klarck
2011-12-14 12:20:23pekka.klarcksetmessageid: <1323865223.14.0.159755001702.issue1828@psf.upfronthosting.co.za>
2011-12-14 12:20:23pekka.klarcklinkissue1828 messages
2011-12-14 12:20:22pekka.klarckcreate