diff options
Diffstat (limited to 'steamrelationships/constants.py')
| -rw-r--r-- | steamrelationships/constants.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/steamrelationships/constants.py b/steamrelationships/constants.py new file mode 100644 index 0000000..af35733 --- /dev/null +++ b/steamrelationships/constants.py | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # God I fucking love python and the shit workarounds it requires for something as simple as a constant variable | ||
| 2 | def constant(f): | ||
| 3 | def fset(self, value): | ||
| 4 | raise TypeError | ||
| 5 | def fget(self): | ||
| 6 | return f() | ||
| 7 | return property(fget, fset) | ||
| 8 | |||
| 9 | class _Const(object): | ||
| 10 | @constant | ||
| 11 | def STEAMAPI_MAXREQ() -> int: | ||
| 12 | return 100000 \ No newline at end of file | ||
