about sort and dictionary

Alex Martelli aleax at mail.comcast.net
Tue Nov 22 22:56:59 EST 2005


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...


Alex



More information about the Python-list mailing list