Skip to content

nicer falsy behavior for LazyConfigValue#584

Closed
minrk wants to merge 3 commits into
ipython:mainfrom
minrk:lazy-empty-falsy
Closed

nicer falsy behavior for LazyConfigValue#584
minrk wants to merge 3 commits into
ipython:mainfrom
minrk:lazy-empty-falsy

Conversation

@minrk

@minrk minrk commented Jun 30, 2020

Copy link
Copy Markdown
Member
  • empty lazy config is falsy, non-empty is truthy
  • checking in for empty lazy config returns False, indicating there's no config there

- empty lazy config is falsy, non-empty is truthy
- checking `in` for empty lazy config returns False, indicating there's no config there
@Carreau Carreau added this to the 5.0 milestone Jul 2, 2020
@Carreau

Carreau commented Jul 2, 2020

Copy link
Copy Markdown
Member

I'm not sure if we should fix the tests, or the __contains__. I can't see why we would like 'foo' in c.foo to be true-ish.

@minrk

minrk commented Sep 4, 2020

Copy link
Copy Markdown
Member Author

Sorry or leaving this forever. The failing tests were mainly verifying that the LazyConfig was stored so that future access would retrieve the same thing, but the asserts were broken by the new falsiness. So I updated the tests to verify presence in another way.

@Carreau Carreau removed this from the 5.0 milestone Aug 30, 2021
@Carreau

Carreau commented Jun 3, 2026

Copy link
Copy Markdown
Member

I'm going to close for innactivity.

@Carreau Carreau closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants