[3.13] gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667) (GH-124757)

It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
(cherry picked from commit 95e92ef6c74e973ea13d15180190d0fa2af82fbf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 files changed