enthought / enthought/traits

Guarantee that traits are assigned in the order given on initialisation

Open
#916 0 comments 0 reactions 0 assignees View on GitHub
component: documentation component: test suite
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.