[Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
Hi all. I'm writing a module to proxy C++ objects into Python for a large C++ application. There are hundreds of thousands of C++ objects, some of which are temporary while others are very long lived. Currently every time one of these objects is accessed from Python, a new myproxy instance is

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
Hi Greg thanks for your quick reply. Perhaps you could use a WeakValueDictionary to keep a mapping from a C++ object address to its Python proxy. Thank you, I'll implement this and see whether it works out. I'll certainly be better off if it does. I was avoiding holding weak references due to

Re: [Python-Dev] Patching builtin_id to allow for C proxy objects?

2011-06-27 Thread Tom Whittock
. Thanks for your help, and sorry for bothering dev with something which was a regular python programming issue after all. Tom. On 27 June 2011 13:31, Tom Whittock tom.whitt...@gmail.com wrote: Hi Greg thanks for your quick reply. Perhaps you could use a WeakValueDictionary to keep a mapping

[Python-Dev] fatal error callback issue

2011-06-08 Thread Tom Whittock
I'm writing in regards to http://bugs.python.org/issue1195571 I'm embedding Python in my application and ran into a need for this functionality. I wrote a similar patch myself, and was about to submit it. When I searched for similar issues I found that this one has been available since 2005. I'd