getopt: where's da dicts?????
Fredrik Lundh
fredrik at pythonware.com
Tue Oct 19 04:07:32 EDT 1999
Les Schaffer <godzilla at netmeg.net> wrote:
> just started using the getopt module. i was surprised to see it
> returns the options in list format rather than perl's (better)
> dictionary format.
maybe that's because the order of the options may some-
times be important, and python dictionaries are unordered.
how does Perl handle that?
(or maybe it's just the C heritage that shows through.
guess you're expected to loop over the options, just
as in C, and in that case, getopt.py has already made
the opt = opt.items() for you...)
</F>
<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->
More information about the Python-list
mailing list