mochi icon indicating copy to clipboard operation
mochi copied to clipboard

No docstring in pattern matching function

Open pya opened this issue 10 years ago • 0 comments

Functions can have docstrings:

>>> def f1():
...     """Docstring."""
... 
<function f1 at 0x102460c80>

but pattern matching functions cannot:

>>> def f2:
...     """Docstring."""
... 
ParsingError: file=<string> lineno=2 colno=21

There should be the possibility to add docstrings to all functions.

Also, multi-line docstrings cannot be specified at the REPL.

pya avatar Jul 27 '15 22:07 pya