Skip to content

Fix a bug in TraitType.default#367

Merged
minrk merged 1 commit intoipython:masterfrom
rmorshea:default_logic_bugfix
Jan 30, 2017
Merged

Fix a bug in TraitType.default#367
minrk merged 1 commit intoipython:masterfrom
rmorshea:default_logic_bugfix

Conversation

@rmorshea
Copy link
Copy Markdown
Contributor

@rmorshea rmorshea commented Jan 30, 2017

Fixes this unexpected error that results from improper logic in TraitType.default - it returns None when it should be returning the value given to the keyword default_value.

class Foo(HasTraits):
    bar = Instance(list, default_value=[])

# raises on master prior to fix
Foo().bar

@minrk minrk added this to the 5.0 milestone Jan 30, 2017
@minrk minrk merged commit e0df490 into ipython:master Jan 30, 2017
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc) and removed 5.0-re-review Need to re-review for potential API impact changes. labels Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants