| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| "\t)\n" | ||
| snip.ifmain = "if __name__ == '__main__':\n" .. | ||
| "\t%1(main())\n" | ||
| snip.class = "class %1(ClassName)%0:\n\t'''%2(documentation)'''\n\n" .. |
There was a problem hiding this comment.
I would much rather prefer something like this:
snip.class = table.concat({
"class %1(ClassName)%2((%3(object))):",
"\t%4('''%5(documentation)'''",
"",
"\t)def __init__(self%6(, %7(arg))):",
"\t\t%8(super(%1, self).__init__())"
}, '\n')
You've missed the trailing newline. It's easy to make that mistake with so many escapes.
I'm not sure this commit is an improvement over longstrings.
Sorry, something went wrong.
|
Hmm... nice :-) I'll try that :-)
/PA
…On Tue, 17 May 2022 at 18:48, orbitalquark ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In init.lua
<#3 (comment)>
:
> -
- )def __init__(self%6(, %7(arg))):
- %8(super(%1, self).__init__())]]
-snip.try = [[
-try:
- %0
-except %2(Exception) as %3(e):
- %4(pass)%5(
-finally:
- %6(pass))]]
+snip.def = "def %1(name)(%2(self)%3(, %4(arg))):\n" ..
+"\t%5('''%6'''\n" ..
+"\t)\n"
+snip.ifmain = "if __name__ == '__main__':\n" ..
+"\t%1(main())\n"
+snip.class = "class %1(ClassName)%0:\n\t'''%2(documentation)'''\n\n" ..
I would much rather prefer something like this:
snip.class = table.concat({
"class %1(ClassName)%2((%3(object))):",
"\t%4('''%5(documentation)'''",
"",
"\t)def __init__(self%6(, %7(arg))):",
"\t\t%8(super(%1, self).__init__())"
}, '\n')
You've missed the trailing newline. It's easy to make that mistake with so
many escapes.
I'm not sure this commit is an improvement over longstrings.
—
Reply to this email directly, view it on GitHub
<#3 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZKU4HNMFFTIEN5O3BLV4LVKPEVVANCNFSM5WEBGJSA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
HI,
I put all snippets as single strings with \n and \t to make better tabulations...