E
Edvard Majakari
I just thought to share mine:
(define-skeleton esm-skel-python-def
"Inserts a new python function definition at point."
"method name: "
"def " str
"("
("argument, %s: "
str & ", ") & -2 & "):" | -1 & "():"
\n
(define-abbrev python-mode-abbrev-table "def" "" 'esm-skel-python-def)
It's not very neat, but it does create a simple, consistent Python def
whenever you type 'def ' and prompts for a name, list of arguments and
comment for the method. Some day I'll try to make it more intelligent and
automatically add 'self' as the first parameter, if I'm inside a class.
--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!
$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
(define-skeleton esm-skel-python-def
"Inserts a new python function definition at point."
"method name: "
"def " str
"("
("argument, %s: "
str & ", ") & -2 & "):" | -1 & "():"
\n
>"\"\"\"" ("comment: " str) ".\"\"\"" \n)
(define-abbrev python-mode-abbrev-table "def" "" 'esm-skel-python-def)
It's not very neat, but it does create a simple, consistent Python def
whenever you type 'def ' and prompts for a name, list of arguments and
comment for the method. Some day I'll try to make it more intelligent and
automatically add 'self' as the first parameter, if I'm inside a class.
--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!
$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";