very good reasons?
Grant Griffin
g2 at seebelow.org
Fri Sep 29 18:17:20 EDT 2000
More information about the Python-list mailing list
Fri Sep 29 18:17:20 EDT 2000
- Previous message (by thread): very good reasons?
- Next message (by thread): filtering out "bad" regular expressions from user input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <wkaecrf2ef.fsf at turangalila.harmonixmusic.com>, Dan says... > >Grant Griffin <g2 at seebelow.org> writes: > >| I would have expected sort and reverse to return the list in >| question, but instead they return None. > >sort and reverse return None so you don't get fooled into thinking >that they don't modify the list you passed in as an argument. > >If you could write > > sorted_arr = arr.sort() > >then people might get surprised that arr changed. Well, I had thought of that, but it didn't really seem compelling to me: I can't find anything in Tim's "Python Philosophy"* that it specifically violates. (unlike-some-of-2.0's-new-features-<wink>)-ly y'rs, =g2 *see http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=651573602&fmt=text _____________________________________________________________________ Grant R. Griffin g2 at dspguru.com Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com
- Previous message (by thread): very good reasons?
- Next message (by thread): filtering out "bad" regular expressions from user input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list