This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author draftcode
Recipients draftcode
Date 2013-01-02.13:50:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357134636.13.0.449777533909.issue16839@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2.7.3 crushes when the following code is run without any library, which means run python with -S option:

    class Test:
        pass
    unicode(Test())

In the course of the interpreter tries to find the "__unicode__" attribute in a class, it uses a cached python string of "__unicode__". The reason of this crush is that the cached value is used before initialized. It is initialized only when trying to find the one of a new-style class, so the interpreter will crush if one uses only classic classes.

The attached patch will fix this issue by initializing a cached value before it is used.

Thanks.
History
Date User Action Args
2013-01-02 13:50:36draftcodesetrecipients: + draftcode
2013-01-02 13:50:36draftcodesetmessageid: <1357134636.13.0.449777533909.issue16839@psf.upfronthosting.co.za>
2013-01-02 13:50:36draftcodelinkissue16839 messages
2013-01-02 13:50:35draftcodecreate