diff options
Diffstat (limited to '.emacs.d/snippets/python-mode/dec')
| -rw-r--r-- | .emacs.d/snippets/python-mode/dec | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.emacs.d/snippets/python-mode/dec b/.emacs.d/snippets/python-mode/dec new file mode 100644 index 0000000..b22c9e9 --- /dev/null +++ b/.emacs.d/snippets/python-mode/dec | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | # -*- mode: snippet -*- | ||
| 2 | # name: dec | ||
| 3 | # key: dec | ||
| 4 | # group : definitions | ||
| 5 | # -- | ||
| 6 | def ${1:decorator}(func): | ||
| 7 | $2 | ||
| 8 | def _$1(*args, **kwargs): | ||
| 9 | $3 | ||
| 10 | ret = func(*args, **kwargs) | ||
| 11 | $4 | ||
| 12 | return ret | ||
| 13 | |||
| 14 | return _$1 \ No newline at end of file | ||
