[Tim Peters] > > OTOH, I do expect that once code relies on stability, we'll have about as > much chance of taking that away as getting rid of list.append(). There you go again! Your flip comment has got me thinking about the "one best idiom" for list appending. So I'll ask the question. Is there a reason to want to get rid of list.append()? How does one decide between list.append() and augmented assignment (+=), such as: >>> l = [] >>> l.append('something') >>> l.append('else') >>> l += ['to'] >>> l += ['consider'] >>> l ['something', 'else', 'to', 'consider'] >>> And wasn't someone documenting current idioms in light of recent Python features? Did that ever get posted anywhere? -- Patrick K. O'Brien Orbtech ----------------------------------------------- "Your source for Python programming expertise." ----------------------------------------------- Web: http://www.orbtech.com/web/pobrien/ Blog: http://www.orbtech.com/blog/pobrien/ Wiki: http://www.orbtech.com/wiki/PatrickOBrien -----------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4