Skip to content

get_string modifies strings that look like boolean values #134

@movermeyer

Description

@movermeyer

Given the HOCON config:

my_string_value = "True"

and the following code:

from pyhocon import ConfigFactory
config = ConfigFactory.parse_file("test.conf")
print repr(config.get_string("my_string_value"))

You get the following output:

u'true'

When I expected it to output:

u'True'

The code for get_string has special handling for "True" and "False". This special handling should probably be moved to get_bool.

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