Shawn Morel <[EMAIL PROTECTED]> added the comment: gpolo: The argument still doesn't hold. As you point out, it's the Values class output from __str__ and other behaviour that is being un- pythonic and leading you to believe it's a dictionary. Adding the __itter__ method would only make this worse. Then someone else would surely ask to have another __*__ method added since dictionaries support it but values don't.
The question then is one for optik. Why doesn't values simply inherit from dict and why does it insist on using __setattr__ rather than actually behaving completely like a dictionary. I know I was completely surprised by the following: >>> (opts, args) = parser.parse_args(values={}) >>> print opts {} >>> ---------- nosy: +shawnmorel __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2444> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com