Skip to content

os.getenv("A_NUMBER") can return an int #9113

@dhalbert

Description

@dhalbert

If settings.toml contains:

A_NUMBER = 123

os.getenv("A_NUMBER") will return the int 123.

This is non-standard compared with CPython, where os.getenv() always returns a string or None.

This came up because I was thinking about adding TOML bool support (true and false) to what we can parse in settings.toml.

I'm not sure this is worth fixing, but I think it's possible to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy