MCPcopy Create free account
hub / github.com/DasyDong/developer-roadmap / Const

Class Const

code/solid_improve.py:1–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Const(object):
2
3 def __setattr__(self, key, value):
4 if key in self.__dict__:
5 raise Exception('Change invalid')
6 if not key.isupper():
7 raise Exception('Change invalid')
8
9 self.__dict__[key] = value
10
11import sys
12

Callers 1

solid_improve.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected