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

get_list() returns NoneValue's, not None's #132

Closed
movermeyer opened this Issue Oct 12, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@movermeyer
Contributor

movermeyer commented Oct 12, 2017

Given the following pyhocon file:

single_value = null
list_value = [null]

And the following code:

from pyhocon import ConfigFactory
config = ConfigFactory.parse_file("test.conf")

single_value = config.get("single_value")
print single_value, single_value is None

list_value = config.get_list("list_value")[0]
print list_value, list_value is None

print single_value == list_value

You get as output:

None True
<pyhocon.config_tree.NoneValue object at 0xe20ad0> False
False

I expected both values to be Python's None.

@darthbear darthbear closed this in 719918e Nov 9, 2017

darthbear added a commit that referenced this issue Nov 9, 2017

Merge pull request #133 from movermeyer/issue_132
NoneValue list elements get replaced with None. Fixes #132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment