Message273629
| Author |
terry.reedy |
| Recipients |
ppperry, python-dev, steven.daprano, terry.reedy |
| Date |
2016年08月25日.06:18:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1472105899.68.0.385155805843.issue25564@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
What I meant is that one cannot use __builtin__ or builtins until one has done the import, which is why people tend not to bother and instead do things like ppperry was doing.
To the extent that tkinter is limited to CPython, so is IDLE. Still, the only reference to __builtins__ is in
F:\Python\dev36円\lib\idlelib\autocomplete.py: 188: (fetch completions)
namespace.update(__main__.__builtins__.__dict__)
I don't know why not just use __builtins__.__dict__, but this follows
import __main__
namespace = __main__.__dict__.copy()
To be cross-platform, you are saying that this should be on 3.x
import builtins; namespace.update(builtins.__dict__) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年08月25日 06:18:19 | terry.reedy | set | recipients:
+ terry.reedy, steven.daprano, python-dev, ppperry |
| 2016年08月25日 06:18:19 | terry.reedy | set | messageid: <1472105899.68.0.385155805843.issue25564@psf.upfronthosting.co.za> |
| 2016年08月25日 06:18:19 | terry.reedy | link | issue25564 messages |
| 2016年08月25日 06:18:19 | terry.reedy | create |
|