Re: Official definition of call-by-value (Re: Finding the instancereferen ce...)
On Nov 21, 4:33 am, Duncan Booth <duncan.bo...@i nvalid.invalidw rote:
Well, the docs don't take my side either.
"object.__setit em__(self, key, value)
Called to implement assignment to self[key]."
But wait, is that true assignment?
"Assignment statements
Assignment statements are used to (re)bind names to values and to
modify attributes or items of mutable objects:"
"If the target is an identifier (name):
.... the name is bound to the object in the current global namespace."
The latter is the case of interest.
On Nov 21, 4:33 am, Duncan Booth <duncan.bo...@i nvalid.invalidw rote:
Aaron Brady <castiro...@gma il.comwrote:
>
>
Oh dear, perhaps you had better get the Python developers to update the
grammar that Python uses as that seems to think it's an assignment:
a[:] = [1, 2, 3]
No, that's not assignment, it's syntactic sugar for a __setslice__
call. No copies here.
call. No copies here.
Oh dear, perhaps you had better get the Python developers to update the
grammar that Python uses as that seems to think it's an assignment:
"object.__setit em__(self, key, value)
Called to implement assignment to self[key]."
But wait, is that true assignment?
"Assignment statements
Assignment statements are used to (re)bind names to values and to
modify attributes or items of mutable objects:"
"If the target is an identifier (name):
.... the name is bound to the object in the current global namespace."
The latter is the case of interest.
Comment