Fix error in def snippet when inside of a class

This commit is contained in:
Holger Rapp 2012-01-25 08:14:54 +01:00
parent da49b4b7c4
commit 91ecf6aec4

View File

@ -323,7 +323,9 @@ def __coerce__(self, other):
endsnippet
snippet def "function with docstrings" b
def ${1:function}(`!p if snip.indent: snip.rv = 'self, '`${2:arg1}):
def ${1:function}(`!p
if snip.indent:
snip.rv = 'self' + (", " if len(t[2]) else "")`${2:arg1}):
"""${4:@todo: Docstring for $1}`!p
snip.rv = ""
snip >> 1