Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test:
- test_static = 1
- @classmethod
- def test1(cls):
- print(cls.test_static)
- @classmethod
- def test2(cls, var=test_static):
- print(var)
- def main():
- Test.test1()
- Test.test2()
- Test.test_static = 2
- Test.test1()
- Test.test2()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement