Why does argparse return None instead of [] if an append action isn't used?
Mark Lawrence
breamoreboy at yahoo.co.uk
Mon Jan 26 12:18:03 EST 2015
On 26/01/2015 16:29, Jussi Piitulainen wrote:
>
> I've used tuples to convey the intention of immutability, as opposed
> to using lists. For all I know, collecting a generator (from groupby)
> into a tuple might be slower than collecting it into a list. I have no
> intention to measure this. The programs have been fast enough for me.
>
IIRC, and probably from this list, creating tuples is way faster than
creating lists, but accessing items is slower. Can anybody confirm this
for us?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-list
mailing list