diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2018-07-26 06:44:39 +0200 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2018-07-26 06:44:39 +0200 |
| commit | a02defca5f26eafdc77502b7215135cff0caf895 (patch) | |
| tree | 881000a03b6c2c629317620650c803f121e7d176 | |
| parent | 6bf177c915395ab6d8a81ff48da22be2261216c1 (diff) | |
| download | python-decorator-git-a02defca5f26eafdc77502b7215135cff0caf895.tar.gz | |
Fix
| -rw-r--r-- | PITCHME.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -131,9 +131,16 @@ def deprecated(func, message='', *args, **kw): func.called += 1 return func(*args, **kw) +``` +Usage with an without parenthesis +``` @deprecated('Use new_function instead') def old_function(): 'Do something' + +@deprecated +def another_old_function(): + 'Do something else' ``` --- http://decorator.readthedocs.io/en/latest/ |
