"> Lonnie Princehouse wrote:
>> Calling the wrapped version of this function from Python will produce a
>> Python wrapper which represents the same underlying C++ object, but is
>> not actually the same Python object:
What I think you need is a custom version of the .__eq__ (self,other)
method t
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. Bo
Lonnie Princehouse 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 translatin
> 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
On Thu, 26 Jan 2006 23:26:14 -0800, Lonnie Princehouse wrote:
>> (objects are not allowed to lie about who they are, or what they are).
>
> Dangit! I need to find a less honest programming language. Anyone
> have a Perl cookbook handy? ...
No, you need a better algorithm.
Why did you want to
Lonnie Princehouse enlightened us with:
> There doesn't seem to be any way to customize the behavior of "is" as
> can be done for other operators... why not?
Pure logic: A == A or A != A. An object is another object or not.
Why would you want to change that?
Sybren
--
The problem with the world
Lonnie Princehouse wrote:
>>(objects are not allowed to lie about who they are, or what they are).
>
>
> Dangit! I need to find a less honest programming language. Anyone
> have a Perl cookbook handy? ...
>
+1 QOTW (approved by a fellow Perl programmer FWIW !-)
--
bruno desthuilliers
python
> (objects are not allowed to lie about who they are, or what they are).
Dangit! I need to find a less honest programming language. Anyone
have a Perl cookbook handy? ...
--
http://mail.python.org/mailman/listinfo/python-list
Lonnie Princehouse wrote:
> There doesn't seem to be any way to customize the behavior of "is" as
> can be done for other operators... why not?
because it does "id(a) == id(b)", and there's no way to customize
the behaviour of id().
(objects are not allowed to lie about who they are, or what the
There doesn't seem to be any way to customize the behavior of "is" as
can be done for other operators... why not?
--
http://mail.python.org/mailman/listinfo/python-list
10 matches
Mail list logo