Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-26 Thread Daniel Holth
Thank you. I started my patch http://bugs.python.org/issue27134 to allow Python code to set a flag causing the evil str(b'bytes') to raise an exception. I wasn't sure exactly which module to put it in, so it's in _string. Please let me know the best place to put the feature and what I should polish

Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-19 Thread Christian Heimes
On 2016-05-19 04:30, Nick Coghlan wrote: > On 18 May 2016 at 23:20, Daniel Holth wrote: >> I would like to take another stab at adding a threadlocal "str(bytes) raises >> an exception" to the Python interpreter, but I had a very hard time >> understanding both how to add a threadlocal value to eit

Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-18 Thread Nick Coghlan
On 18 May 2016 at 23:20, Daniel Holth wrote: > I would like to take another stab at adding a threadlocal "str(bytes) raises > an exception" to the Python interpreter, but I had a very hard time > understanding both how to add a threadlocal value to either the interpreter > state or the threadlocal

Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-18 Thread Christian Heimes
On 2016-05-18 15:20, Daniel Holth wrote: > I would like to take another stab at adding a threadlocal "str(bytes) > raises an exception" to the Python interpreter, but I had a very hard > time understanding both how to add a threadlocal value to either the > interpreter state or the threadlocal dict

[Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-18 Thread Daniel Holth
I would like to take another stab at adding a threadlocal "str(bytes) raises an exception" to the Python interpreter, but I had a very hard time understanding both how to add a threadlocal value to either the interpreter state or the threadlocal dict that is part of that state, and then how to acce