Overloadable Assignment PEP
Drew Moore
drew at astro.pas.rochester.edu
Fri Apr 4 07:45:03 EST 2003
Erik Max Francis <max at alcyone.com> wrote in message news:<3E8CF4B5.1E221DD7 at alcyone.com>...
> Bengt Richter wrote:
>
> > So how do you feel about properties? Seems like the OP's proposal
> > would
> > open up another way to implement at least the assignment part. Perhaps
> > there should be an analogous __getvalue__ method for the right hand
> > side.
> > (Already ducking ;-)
I had the same thought..
>
> I really should have said "rebinding" instead of "rebinding/attribute
> assignment." I misspoke, sorry.
>
> I know
>
> something = somethingElse
>
> is always going to mean rebinding, and I like that..
Can we follow up on this a little?
I'm trying to understand this concern in more detail..
I'd like this PEP to go one of two ways..
either implementation,
or a good solid technical reason why its a bad idea.
so far, the response seems to be:
"it is technically possible, but my scripts might
run slower.. and it just makes me nervous."
I suspect there is some basis for this nervousness, but
I still haven't seen an example of how this proposed feature
would break things.
since no current code uses __assign__,
nothing would break immediately.
however, once it started to be used.. what would go wrong??
nothing? ## in your dreams, kiddo
all hell would break loose? ## far more likely.
What are use cases when
something = somethingElse
with overloadable assignment
will give real problems in a real-world code example?
would help() immediately break?
would inspect immediately break?
would pydoc immediately break?
I'm an electrical engineer..
I have never won any popularity
contests with my programming skills (or lack thereof)...
still,
I'd like to see this PEP die for a good technical reason.
help me out here!!
Drew
More information about the Python-list
mailing list