Guarantee that traits are assigned in the order given on initialisation
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
For Python >= 3.6, we have the happy situation that `**kwds` arguments to a function call retain their natural (i.e., lexical, from the source) ordering. That means that we could potentially guarantee that when instantiating a `HasTraits` instance, the traits are set in the order given.
I think we should make such a guarantee. This means adding tests for that behaviour, along with documenting that this is guaranteed for the future and not simply an implementation accident.
That leaves open the question of what to do in the near term for Python 3.5. In the long term (e.g., by the end of this year), we'll drop Python 3.5 support. (Ref: #831)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.