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

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

movermeyer opened this issue Oct 12, 2017 · 0 comments

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

movermeyer opened this issue Oct 12, 2017 · 0 comments


Copy link

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

I expected both values to be Python's None.

darthbear added a commit that referenced this issue Nov 9, 2017
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
None yet
None yet

No branches or pull requests

1 participant