about sort and dictionary

bonono at gmail.com bonono at gmail.com
Tue Nov 22 23:12:20 EST 2005


Alex Martelli wrote:
> bonono at gmail.com <bonono at gmail.com> wrote:
>    ...
> > intuitive seems to be a very subjective matter, depends on once
> > background etc :-)
>
> That's a strong point of Ruby, actually -- allowing an exclamation mark
> at the end of a method name, which conventionally is always used to
> indicate that the method is a mutator.  So, you can have a.reverse [NOT
> mutating a since no !] _and_ a.reverse! [mutating a].  Probably too much
> of a change even for Python 3000, alas... but, it DOES make it obvious
> when an object's getting mutated, and when not...
>
And I doubt if it should be added because of the history of python. As
that would effectively mean changing the meaning of a function because
of version, where old codes means differently for people who learn the
new syntax.




More information about the Python-list mailing list