Suggesting for overloading the assign operator

Rim rimbalaya at yahoo.com
Tue Jul 1 13:07:04 EDT 2003


"Terry Reedy" <tjreedy at udel.edu> wrote in message news:<coqdnfH2G47kl5yiXTWJkA at comcast.com>...
> "Rim" <rimbalaya at yahoo.com> wrote in message
> news:6f03c4a5.0306301931.3f15fbb7 at posting.google.com...
> > Hi,
> >
> > I have been thinking about how to overload the assign operation '='.
> 
> Assignment is a statement, not an operator, and therefore not
> overloadable .  This is an intentional design decision that GvR will
> not change.

Well, what about the idea of providing another statement, the one I
proposed in the original post?

'=' statement assigns type and value
':=' statement assigns value only

Rim




More information about the Python-list mailing list