Message178811
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. |
|
Date |
User |
Action |
Args |
2013-01-02 13:50:36 | draftcode | set | recipients:
+ draftcode |
2013-01-02 13:50:36 | draftcode | set | messageid: <1357134636.13.0.449777533909.issue16839@psf.upfronthosting.co.za> |
2013-01-02 13:50:36 | draftcode | link | issue16839 messages |
2013-01-02 13:50:35 | draftcode | create | |
|