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?
There once was a proposal to have the argparse inherit. That said, just use the types one if you are using a new enough Python; that's what it is there for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With