Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidated TraitType Defaults Into One Generator #349

Merged
merged 1 commit into from
Nov 21, 2016

Conversation

rmorshea
Copy link
Contributor

@rmorshea rmorshea commented Nov 18, 2016

Closes #344

  • New method TraitType.default which acts exactly like the methods defined by @default.
  • Fixes a test case inheriting from HasTraits instead of TestCase, which masked Default value of Union is not respected #344.
  • New test for Union defaults defined by "subtraits".

Note

TraitType.default could be built into make_dynamic_default by extending its signature, but I'm slightly averse to this idea simply for the sake of uniformity between TraitType.default and @default, and the fact that the name make_dynamic_default is now redundant. If we choose to prefer default to make_dynamic_default, then the functionality of make_dynamic_default will be redundant too and would be on a track towards deprecation.

@minrk minrk added this to the 5.0 milestone Nov 21, 2016
@minrk minrk merged commit 7a705a5 into ipython:master Nov 21, 2016
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-minor rereviewed, minor change need to be put in changelog. labels Jun 4, 2020
@Carreau Carreau removed the 5.0-re-review Need to re-review for potential API impact changes. label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0-minor rereviewed, minor change need to be put in changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default value of Union is not respected
3 participants