
Feb. 12, 2010
10:58 a.m.
George Sakkis wrote:
Speaking of new potential list methods, how about list.get(index, default=None) ala dict.get ? I'm sure this has must have come up at some point but can't find it ATM.
I believe it runs afoul of the moratorium, but a getitem() builtin might be a better idea (since it would then work for any class that implements __getitem__). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------