Message163290
| Author |
terry.reedy |
| Recipients |
Ramchandra Apte, amaury.forgeotdarc, loewis, r.david.murray, terry.reedy |
| Date |
2012年06月20日.18:36:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1340217400.56.0.356891692301.issue15113@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
To put it another way, IDLE is written for standard Python. A standard Python interpreter has a getattr builtin that works as documented in the library manual. Deleting that or any other builtin makes the interpreter non-standard. So would replacing or wrapping the builtin with a function that does anything other than innocuously augmenting the behavior with something like counting calls or logging them to a file.
Deletion of getattr *does* create problems for CPython (or any interpreter) in that legal Python code using getattr no longer runs. I presume CPython can limp along and execute other code because it directly calls the C function wrapped by the __builtins__.getattr object. |
|