[EMAIL PROTECTED] wrote:
> Alex Martelli wrote:
> 
>>[EMAIL PROTECTED] <[EMAIL PROTECTED]> 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...

Except when it isn't obvious. What constitutes mutation of an object?
C++ handles this with 'const', and lets the programmer cheat by using
transient member variables, since there are cases when you actually
want to mutate objects a little, but claim that you don't...

Perhaps we need a.reverse? for just-mutating-a-little reverse as well?
;^)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to