Overloadable Assignment PEP

Bengt Richter bokr at oz.net
Thu Apr 3 19:09:57 EST 2003


On Thu, 03 Apr 2003 14:58:17 -0800, Erik Max Francis <max at alcyone.com> wrote:

>Michael Hudson wrote:
>
>> I certainly did.
>
>Me too.  I don't have any huge opinion on the proposition one way or
>another, but I must say I do find it reassuring in Python to know that
>(at present, without the proposal) whenever I see an assignment, I
>always know that there's going to be a rebinding/attribute assignment
>taking place.  Assignment seems so fundamental an operation that I'm not
>sure whether it would be net good or net bad to have it overridable.
>
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 ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list