Skip to content
Snippets Groups Projects
Commit cf1c100c authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

Merge branch 'master' into develop

parents 35668e5a 6fc5e9ea
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ def static_var(var_name: str, starting_value): ...@@ -13,7 +13,7 @@ def static_var(var_name: str, starting_value):
>>> class MyClass: >>> class MyClass:
>>> @static_var('counter', 2) >>> @static_var('counter', 2)
>>> def count(): >>> def count():
>>> MyClass.counter += 1 >>> MyClass.count.counter += 1
""" """
def decorate(func): def decorate(func):
setattr(func, var_name, starting_value) setattr(func, var_name, starting_value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment