Skip to content

Commit 1a721cf

Browse files
author
Christian Strappazzon
committed
Added set comprehension
1 parent ec55be1 commit 1a721cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

snippets/snippets.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@
138138
"prefix": "dc",
139139
"body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:variable}}$0"
140140
},
141+
"Set Comprehension": {
142+
"prefix": "sc",
143+
"body": "{${1:value} for ${2:value} in ${3:variable}}$0"
144+
},
145+
"Set Comprehension If Filter": {
146+
"prefix": "sci",
147+
"body": "{${1:value} for ${2:value} in ${3:variable} if ${4:condition}}$0"
148+
},
141149
"Gerator Comprehension": {
142150
"prefix": "gc",
143151
"body": "(${1:key} for ${2:value} in ${3:iterable})"

0 commit comments

Comments
 (0)