strings and sort()
Delaney, Timothy
tdelaney at avaya.com
Thu Feb 21 18:34:56 EST 2002
More information about the Python-list mailing list
Thu Feb 21 18:34:56 EST 2002
- Previous message (by thread): strings and sort()
- Next message (by thread): strings and sort()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: caljason76 at yahoo.com [mailto:caljason76 at yahoo.com] > > I still think that the convenience of having sort() return the list > far outweighs the cost. People would only get bit once, maybe twice, > before they learned the behavior of sort. Actually, this is the type of subtle bug which is likely to hang around for a while without being noticed (or be the cause of hour-long bug-hunts). OTOH, because sort() returns None, it is impossible for someone to then try to use the result as a list without an exception being thrown, revealing exactly where the error occurred. No subtle bugs here. People only get bitten once, maybe twice, before they learn the behaviour of sort(). And they are guaranteed to *know* that they have been bitten. > I like Python, but the biggest problem I have with the language right > now is what low code density it has at times. Huh? Low code density? Huh? Tim Delaney
- Previous message (by thread): strings and sort()
- Next message (by thread): strings and sort()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list