Skip to content

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

Closed
@movermeyer

Description

@movermeyer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions