homepage

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 arigo
Recipients
Date 2005年05月19日.15:05:57
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4771
This is not about the new module. The same example can be written as:
 import types
 class A: pass
 A.__mul__ = types.MethodType(operator.mul, None, A)
If this still looks essentially like an indirect way of using the new module, here is another example:
 class A(str): __get__ = getattr
 a = A('a')
 A.a = a
 a.a
Or, as I just found out, new-style classes are again vulnerable to the older example based __call__, which was fixed for old-style classes:
 class A(object): pass
 A.__call__ = A()
 A()()
I'm not denying that these examples look convoluted :-)
My point here is that we can basically build a lot of examples based only on core (if not necessarily widely understood) language features. It appears to go against the basic hope that CPython cannot be crashed as long as you don't use features explicitely marked as dangerous.
History
Date User Action Args
2007年08月23日 14:31:54adminlinkissue1202533 messages
2007年08月23日 14:31:54admincreate

AltStyle によって変換されたページ (->オリジナル) /