This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients eric.snow, paul.j3, rhettinger
Date 2019-12-17.22:10:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 in which attributes are added.  A poster wanted to preserve the sys.argv order.

Most attributes are added as defaults at the start of parsing - via a loop through parser._actions.  Predefining the namespace, SUPPRESS defaults, parser.set_defaults may alter this default order.

Anyways removing the sort makes sense, and the proposed change phrase "in the order attributes were added" is sufficiently general.
Date User Action Args
2019-12-17 22:10:31paul.j3setrecipients: + paul.j3, rhettinger, eric.snow
2019-12-17 22:10:31paul.j3setmessageid: <>
2019-12-17 22:10:31paul.j3linkissue39058 messages
2019-12-17 22:10:31paul.j3create