about sort and dictionary

Mike Meyer mwm at mired.org
Wed Nov 23 23:21:49 EST 2005


aleax at mail.comcast.net (Alex Martelli) writes:
> Neil Hodgson <nyamatongwe+thunder at gmail.com> wrote:
>>     Ruby uses '!' not for mutation but to indicate surprising or 
>> destructive mutation. If it was placed on all mutators, code would be
>> full of '!'s. '!' is less common on methods that modify the receiver 
>> than on methods that mutate other arguments.
> Thanks for the clarification!  Unfortunately, this variation on the
> convention does make it substantially less clear/sharp/well-defined, and
> therefore less useful;

For the record, the ! convention (and the ? convention) are used by
scheme, where it is used to indiciation mutation (and a predicate). Of
course, scheme isn't OO, and is functional, so that mutation is the
exception rather than the rule.

          <mke
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list