In article <[EMAIL PROTECTED]>,
Lonnie Princehouse <[EMAIL PROTECTED]> wrote:
>
>> Why did you want to customize "is"?
>
>Well, mostly out of principle ;-)
>
>But also because I'm wrapping a C library which passes around C structs
>which are wrapped in shim C++ classes for a Boost.Python layer.  Boost
>Python does a marvelous job of translating between Python and C++ data
>types; when a C structure is returned, it magically translates that
>structure into a Python wrapper.   The problem is that a _new_ Python
>wrapper is created every time a pointer is returned, even if a  wrapper
>already exists for that particular pointer.

Then you need to fix Boost.Python.  This cannot and will not get fixed at
the Python level -- how can Python possibly know that they are the same
objects?
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"19. A language that doesn't affect the way you think about programming,
is not worth knowing."  --Alan Perlis
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to