[Tutor] 'in-place' methods

Alan Gauld alan.gauld at freenet.co.uk
Sun Feb 19 01:13:14 CET 2006


>> Ruby has an interesting approach to this - the names of mutating methods
>> end with !. So it would be list.sort!() which gives a strong cue to what
>
> What a great idea!  Hmm.. maybe Python could do this, too; and use some
> other characters like $, @ and % to indicate if a name is a reference to a
> plain old variable, a list, or a dictionary!

:-)

But don't even joke about it.
Decorators are bad enough, no more line noise in Python.
If we want weird characters in our code we can just learn Perl!

I assume this was intended irony Terry?....

Alan G. 



More information about the Tutor mailing list