Skip to content

Commit 464517d

Browse files
authored
ENH: python-mode/with-open (#482)
1 parent b00a7c9 commit 464517d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

snippets/python-mode/with-open

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- mode: snippet -*-
2+
# name: with-open
3+
# key: wo
4+
# group : control structure
5+
# contributor: Quazgar
6+
# --
7+
with open(${1:"filename"}${2:, encoding="${3:utf-8}"}${4:, mode="${5:w}"}) as ${6:myfile}:
8+
$0

0 commit comments

Comments
 (0)