mirror of
https://github.com/573dev/gfdm-server.git
synced 2026-03-22 02:04:24 -05:00
- A more generic class loader depending on request url, baed on method and module to avoid big if trees. Better separation of data classes as well imo.
17 lines
302 B
Python
17 lines
302 B
Python
def bool_to_int(value: bool) -> int:
|
|
"""
|
|
Convert a boolean to an integer.
|
|
|
|
True = 1, False = 0
|
|
"""
|
|
return 1 if value else 0
|
|
|
|
|
|
def int_to_bool(value: int) -> bool:
|
|
"""
|
|
Convert an integer to a boolean.
|
|
|
|
1 = True, 0 = False
|
|
"""
|
|
return False if value == 0 else True
|