Skip to content

Python yaml package does not parse all float values correctly. #23

Open
@dhruvdcoder

Description

@dhruvdcoder

For example, a value 1e-5 will be parsed as a string "1e-5" instead of a float.

Possible solutions:

  1. Have a special regex to parse this before we parse using yaml.load.
  2. You another yaml package like ruamel

How to by-pass the issue without fixing?
Use environment variable to get the value to the jsonnet instead of command line override.

Ref: https://stackoverflow.com/questions/30458977/yaml-loads-5e-6-as-string-and-not-a-number

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions