enthought / traits

Observable typed attributes for Python classes
Other
432 stars 85 forks source link

Deprecate acceptance of lists by Tuple traits #1627

Closed mdickinson closed 2 years ago

mdickinson commented 2 years ago

This PR changes the Tuple trait type so that it only ever accepts instances of type tuple. Previously, the argument-less trait type Tuple() would accept (and coerce) list instances in addition to tuple instances, while with arguments (e.g., Tuple(Int(), Int()), only tuples would be accepted.

Work towards #1626, but this PR doesn't change the behaviour of the BaseTuple trait type at all.

Checklist