Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31121 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2012-10-12 01:25 +1100 |
| Last post | 2012-10-12 01:25 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: __builtins__ thread-safe / __builtins__ as function? Chris Angelico <rosuav@gmail.com> - 2012-10-12 01:25 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-10-12 01:25 +1100 |
| Subject | Re: __builtins__ thread-safe / __builtins__ as function? |
| Message-ID | <mailman.2054.1349965530.27098.python-list@python.org> |
On Fri, Oct 12, 2012 at 1:16 AM, Juergen Bartholomae <bartholomae.juergen@googlemail.com> wrote: > One possible solution is to somehow redirect every __builtins__ to a > function that returns a different __builtins__ dictionary for each thread > (such a function already exists). How exactly does the code reference it? If they're simply referring to the name __builtins__ at module level, you ought to be able to import the module, then assign some_module.__builtins__ to your thread-local object, then call code in it as normal. An interesting problem, and one where monkeypatching is, imho, justified. ChrisA
Back to top | Article view | comp.lang.python
csiph-web