Replies: 2 comments 6 replies
-
Although TOML wasn't designed to be a general-purpose data language, there are lots of tools that allow arbitrary data in their configurations. In the case of In TOML's early days, we rejected nulls in configuration, because we thought that new projects adopting TOML could design their configurations from day one to avoid nulls. But as existing projects transition to TOML, it is getting more difficult to keep this condition, precisely because of the need for naïve data expression. I hate suggesting that we add |
Beta Was this translation helpful? Give feedback.
-
As a user I don't want to deal with the overhead of checking docs for a given tool's special "NULL" case for each key, and hope that the authors have good taste and consistency. And as a user I don't want to delve into source or documentation to figure out what the "default" is for a given key. That's an implementation detail that I shouldn't have to deal with as a user. As an author I want the ability to have cascading config files and I don't want to reserve a special "NULL" value for each key. I want to be able to use the entire range of the type (ie. an unsigned, unbounded number like JS' BigInt). This came up for me recently as a user with the DVCS Jujutsu, which uses TOML for its config. It has a user-level I had a config key ( How would the JJ authors define a "NULL" string here? An invalid filename as a "default" value? Maybe the JJ maintainers have a cleaner implementation in mind to support this use case, but having a first-class NULL value in TOML seems useful here. |
Beta Was this translation helpful? Give feedback.
-
Just bumped into this limitation in real life, specifically with a list containing nulls
pyproject.toml
:"" or {} don't work, they are interpreted as a string/dictionary, not None. This expects exactly 12 values to insert one record into a ?sql? table where all columns except the first one are nullable.
I know the perfect fix would be to improve support of
pyproject.toml
in cx_Freeze. (As opposed to oldersetup.py
, which obviously can create tuples with Nones easily). Ideally they should probably represent records in msi tables as a dictionaries and not tuples in the first place. But I can see why they went with the easiest implementation for the niche use-case of creating MSI installers, especially as setup.py was the only way to configure projects, so toml limitations were not even on the horison.But having absolutely no way to represent None/null is still very annoying.
Beta Was this translation helpful? Give feedback.
All reactions