Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit 15d2083

Browse files
authored
Add async function definition
Since Python 3.5 we can use keywords _async_ and _await_ for asynchronous programming. https://docs.python.org/3/whatsnew/3.5.html#pep-492-coroutines-with-async-and-await-syntax
1 parent 533dc0b commit 15d2083

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎snippets/base.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
"body": "def ${1:fname}(${2:arg}):\n\t${3:pass}0ドル",
6161
"description" : "Code snippet for function definition."
6262
},
63+
"New async function": {
64+
"prefix": "adef",
65+
"body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}0ドル",
66+
"description" : "Code snippet for async function definition."
67+
},
6368
"New property": {
6469
"prefix": "property",
6570
"body": "@property\ndef ${1:foo}(self):\n \"\"\"${2:The 1ドル property.}\"\"\"\n ${3:return self._1ドル}\n@${4:1ドル}.setter\ndef ${5:1ドル}(self, value):\n ${6:self._1ドル} = value",
@@ -120,4 +125,4 @@
120125
"body": "if __name__ == \"__main__\":\n\t${1:main()}0ドル",
121126
"description" : "Create implicitly all the code at the top level using the __name__ special variable."
122127
}
123-
}
128+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /