[Python-Dev] Proposal: thread.get_dict

Raymond Hettinger python at rcn.com
Mon Jun 28 01:52:36 EDT 2004

> On Mon, Jun 28, 2004 at 10:50:08AM -0400, Jim Fulton wrote:
> > I propose, for 2.4, to add a get_dict method to the thread
> > module that will return this dictionary.  This will be
> > implemented via a call to PyThreadState_GetDict.

> I am pretty sure that some extension modules would badly crash if
> arbitrary
> Python code would be allowed to temper with the data that they store
> there.

Would it defeat the purpose to expose a read-only dictionary proxy (such
as that in descrobject.c) ?


More information about the Python-Dev mailing list