blob: cf52151cc527e61352e5e7dcc1cba37d11227e99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# God I fucking love python and the shit workarounds it requires for something as simple as a constant variable
def constant(f):
def fset(self, value):
raise TypeError
def fget(self):
return f()
return property(fget, fset)
class _Const(object):
@constant
def STEAMAPI_MAXREQ() -> int:
return 100000
@constant
def DAY_IN_NANO() -> int:
return (8.64 * (10 ** 13))
@constant
def JSON_INDENT() -> int:
return 4
|