[issue39058] argparse should preserve argument ordering in Namespace

2020-05-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9681953c99b686cf23d1c476a2b26d2ddbec7694 by Raymond Hettinger in branch 'master': bpo-39058: Preserve attribute order in argparse Namespace reprs. (GH-17621) https://github.com/python/cpython/commit/9681953c99b686cf23d1c476a2b26d2ddbec7694

[issue39058] argparse should preserve argument ordering in Namespace

2020-05-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread paul j3
paul j3 added the comment: This patch changes the super class, _AttributeHolder. ArgumentParser and Actions also inherit from this, though they have their own _get_kwargs methods, and so aren't affected by the sort and its removal. I just had occasion on stackoverflow to discuss the order i

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread Eric Snow
Eric Snow added the comment: FWIW, I've also opened issue #39076 about subclassing types.SimpleNamespace. -- ___ Python tracker ___ ___

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread Eric Snow
Eric Snow added the comment: > Currently, Namespace() objects sort the attributes in the __repr__. This is > annoying because argument > order matters and because everywhere else in the module we preserve order > (i.e. users see help in the > order that arguments are added). Hmm, I was goin

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +17091 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17621 ___ Python tracker __

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger
New submission from Raymond Hettinger : Currently, Namespace() objects sort the attributes in the __repr__. This is annoying because argument order matters and because everywhere else in the module we preserve order (i.e. users see help in the order that arguments are added). Note, the docs