Author eric.snow
Recipients eric.snow
Date 2019-12-17.16:35:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
types.SimpleNamespace does pretty much exactly the same thing as argparse.Namespace.  We should have the latter subclass the former.  I expect the only reason that wasn't done before is because SimpleNamespace is newer.

The only thing argparse.Namespace does differently is it supports the contains() builtin.  So the subclass would look like this:

class Namespace(types.SimpleNamespace):
    def __contains__(self, key):
        return key in self.__dict__

Alternately, we could add __contains__() to SimpleNamespace and then the subclass would effectively have an empty body.
Date User Action Args
2019-12-17 16:35:51eric.snowsetrecipients: + eric.snow
2019-12-17 16:35:51eric.snowsetmessageid: <>
2019-12-17 16:35:51eric.snowlinkissue39076 messages
2019-12-17 16:35:51eric.snowcreate