Alex Martelli wrote: > Josiah Carlson <[EMAIL PROTECTED]> wrote: > >>> pitfall of Python is knowing whether an operation is destructive or not. >> If it returns None, it probably changes the content of an object. > > A reasonable heuristic, but with lots of exceptions, alas: > somedict.get(somekey) > will often return None without performing any change, while > somelist.pop() > does modify somelist but typically returns non-None. > > The use of trailing-exclamation-point (by convention) to indicate > "mutating methods" is a nice plus in languages that allow it.
Actually, that'd be nice to have in Python. And whilst we're about it, might as well go the whole hog and allow hyphens in names, too. -- http://mail.python.org/mailman/listinfo/python-list