asignz

joined 1 year ago
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Just use 'strtobool' from distutils to parse str as bool much better than reinventing the wheel https://docs.python.org/3.11/distutils/apiref.html#distutils.util.strtobool

edit: ok it uses if internally so without if you could do it with match statement