Message138712
| Author |
ncoghlan |
| Recipients |
alex, michael.foord, ncoghlan, python-dev |
| Date |
2011年06月20日.13:49:07 |
| SpamBayes Score |
2.1375634e-05 |
| Marked as misclassified |
No |
| Message-id |
<1308577747.85.0.262290346485.issue12370@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
And to record the workaround for 3.1 and 3.2 (courtesy of Michael):
Adding a "_super = super" alias at the module level and using the Python 2.x style long form invocation on _super() in affected methods will avoid the compiler games played when using super() directly. That is::
_super = super
class X(object):
def __init__(self):
_super(self, X).__init__()
@property
def __class__(self):
return int
print (isinstance(X(), int)) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月20日 13:49:07 | ncoghlan | set | recipients:
+ ncoghlan, alex, michael.foord, python-dev |
| 2011年06月20日 13:49:07 | ncoghlan | set | messageid: <1308577747.85.0.262290346485.issue12370@psf.upfronthosting.co.za> |
| 2011年06月20日 13:49:07 | ncoghlan | link | issue12370 messages |
| 2011年06月20日 13:49:07 | ncoghlan | create |
|