talon_community icon indicating copy to clipboard operation
talon_community copied to clipboard

`define function`

Open isomorphisms opened this issue 7 years ago • 2 comments

define function in python should create the following text:

def {{{cursor here}}}( ):
  {{{two spaces here}}}
  return "success"

It would be nice if it can also recognise words like returning and arguments at the end-of-paragraph and ( , , , ).

isomorphisms avatar Mar 19 '19 23:03 isomorphisms

i currently use quinn in combination with atom snippets to achieve exactly this: quinn define function. Though it might be nice to have something built into talon instead for cross editor standardization.

dwiel avatar Mar 20 '19 13:03 dwiel

Interesting suggestion, but 2 spaces are not a python standard, neither is return "success". I suggest to add an empty docstring instead. A missing docstring is an error with some python linters (e.g. pylint).

iacopy avatar Apr 23 '20 11:04 iacopy