[Python-ideas] getitem(obj, key, default) [was: Default return values to int and float]

Nick Coghlan ncoghlan at gmail.com
Tue Oct 4 04:48:02 CEST 2011


On Mon, Oct 3, 2011 at 10:04 PM, Raymond Hettinger
<raymond.hettinger at gmail.com> wrote:
> Does this make any semantic sense to users (i.e. they specifically want to the i-th item of sequence but don't even know long the sequence is)?

I still occasionally want to do it with sys.argv to implement optional
positional arguments before I remind myself to quit messing around
reinventing the wheel and just import argparse. But yeah, being a
better idea than the conversion function proposals is a far cry from
being a good idea :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list