serhii.net

In the middle of the desert you can say anything you want

20 Dec 2021

representing empty strings in ini files

In the context of reading a settings.ini from python’s decouple1 config lib, this works as empty string

YAML_CONVERTER_PREFIX=

has to be cast to string though:

D_YAML_CONVERTER_PREFIX = config("YAML_CONVERTER_PREFIX", cast=str)

These don’t, these are strings containing two characters, "" and '' respectively.

YAML_CONVERTER_PREFIX=""
YAML_CONVERTER_PREFIX=''
Nel mezzo del deserto posso dire tutto quello che voglio.