This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients bubthegreat, paul.j3, serhiy.storchaka
Date 2018-09-28.18:50:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As documented in

you can create your own 'namespace' class, that does everything you want and more.  argparse makes very few assumptions about the object - using getattr, setattr, and hasattr where possible.

All that the argparse.Namespace class adds to a plain object is the ability to set initial attributes, and to display them in a pretty way.

Look at Namespace.__repr__ to see how it accesses its attributes.

For a function with a

    fn(*args, **kwargs)

signature, a namespace 'ns', can be passed in in 2 ways:

   fn(*ns._get_kwargs(), **ns.__dict__)
Date User Action Args
2018-09-28 18:50:44paul.j3setrecipients: + paul.j3, serhiy.storchaka, bubthegreat
2018-09-28 18:50:44paul.j3setmessageid: <>
2018-09-28 18:50:44paul.j3linkissue34827 messages
2018-09-28 18:50:44paul.j3create