[issue11881] Add list.get

2011-04-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11881 ___ ___ Python-bugs-list

[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński
New submission from Filip Gruszczyński grusz...@gmail.com: I have proposed on Core Mentorship list to add get(index, default) method to list object. I was suggested to bring it up here and also told, that improving operator module could be a better solution. This is why I would like to ask, if

[issue11881] Add list.get

2011-04-19 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Sorry, this has come up before and was rejected. -- nosy: +rhettinger resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11881] Add list.get

2011-04-19 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: What did you have in mind for the operator module? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11881 ___

[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Nick Coghlan suggested, that operator.getitem could be extended to accept default value. How does it sound to you? -- ___ Python tracker rep...@bugs.python.org

[issue11881] Add list.get

2011-04-19 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: operator.getitem could be extended to accept default value That would be relatively harmless. And because it isn't type specific to lists, it would be applicable to other types that might better use cases than lists do. If