Does Python need "const" ? (Re: PEP 218 Re: ANN: set-0.1 module available)

Mark McEahern marklists at mceahern.com
Fri May 17 23:50:19 EDT 2002


[Huaiyu Zhu]
> # const reference to mutable object
> const a = "abc"
> #   forbids a = "xyz"
> #   allows b = a; a += "uvw"; which would set b to "abcuvw".

Presumably, you mean:

> #   allows b = a; b += "uvw"; which would set b to "abcuvw".

// mark





More information about the Python-list mailing list