Friday, March 20, 2009

More Python YASnippets

I found that snippets were missing for try- and with-statements as well, so I created some:

# contributor: Mads D. Kristensen
# name: try
# --
try:
$0
except ${1:Exception}, ${2:e}:
pass


# contributor: Mads D. Kristensen
# name: with
# --
with ${1:lock}:
$0

These are very simple snippets but I find them immensely useful and I hope you will too :-)

No comments:

Post a Comment