> Also, I'm not sure I like your abuse of the + operator to modify the
> object in place and return a flag. It is an API not shared by (as far as
> I can see) any other data type in Python.
I agree it couuld be more consisten with other object apis,
I also think that if every api has to conform t
On Dec 13, 11:37 am, mattia wrote:
> How can I insert non-duplicate data in a list? I mean, is there a
> particular option in the creation of a list that permit me not to use
> something like:
> def append_unique(l, val):
> if val not in l:
> l.append(val)
>
> Thanks,
> Mattia
You cou
> It's not implemented in the compiler. There's a place in the runtime
> for invoking a method where the object is inserted at the beginning
> of the parameter list. IIRC, that's done by wrapping the function
> object.
This is the source of Objects/methodobject.c it look like this is
where
self is
I'm looking for an explanation of how explicit self is implimented and
what features are only possible because of, or are greatly improved,
because of it. I've always liked explicit self and am looking for the
computer science behind it, so that I can explain the benefits that I
see.
I'm also inte