bpo-39058: Preserve attribute order in argparse Namespace reprs. (GH-17621)

This commit is contained in:
Raymond Hettinger 2020-05-17 18:53:01 -07:00 committed by GitHub
parent eefd4e0333
commit 9681953c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -4725,7 +4725,7 @@ class TestStrings(TestCase):
def test_namespace(self):
ns = argparse.Namespace(foo=42, bar='spam')
string = "Namespace(bar='spam', foo=42)"
string = "Namespace(foo=42, bar='spam')"
self.assertStringEqual(ns, string)
def test_namespace_starkwargs_notidentifier(self):