Difference between argparse.Namespace and types.SimpleNamespace?

Viewed 127

It seems they both behave exactly the same – both are like dicts but with . literal to access an item, however none of it is even a subclass of another

from argparse import Namespace
from types import SimpleNamespace

issubclass(Namespace, SimpleNamespace)  # False
issubclass(SimpleNamespace, Namespace)  # False

So, are there any differences between them two? Can argparse.Namespace be used in all cases?

1 Answers
Related