summaryrefslogtreecommitdiff
path: root/steamrelationships/constants.py
blob: 2f0736468cfa1cd8f38603c93dc4c2df84a8d7cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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 int(8.64 * (10 ** 13))

    @constant
    def JSON_INDENT() -> int:
        return 4