The from_formatted_string_visitor.py
module#
Summary#
Converts a string formatted for a locale to the |
Convert a string representation of truth to true (1) or false (0). |
Description#
Defines the FromFormattedStringVisitor
class.
Module detail#
- from_formatted_string_visitor.strtobool(val)#
Convert a string representation of truth to true (1) or false (0).
True values are βyβ, βyesβ, βtβ, βtrueβ, βonβ, and β1β; false values are βnβ, βnoβ, βfβ, βfalseβ, βoffβ, and β0β. Raises ValueError if βvalβ is anything else.