PEP 257 – Docstring Conventions - Python Enhancement Proposals
May 29, 2001 ... def function(a, b): """Do X and return a list.""" (Of course “Do X” should be replaced by a useful description!) Multi-line Docstrings.
May 29, 2001 ... def function(a, b): """Do X and return a list.""" (Of course “Do X” should be replaced by a useful description!) Multi-line Docstrings.
Examples. Example: Forwarding an asynchronous result. Example: Keeping state across an await. Example: Handling a timeout. Example: Scheduling a dependent read. Example: Acquiring an async lock for native work. Reference Implementation. Rejected Ideas.
Jan 4, 2016 ... Examples. Following examples are not written to show powerful optimizations promising important speedup, but to be short and easy to ...
This PEP proposes adding the core of the Pyodide foreign function interface to Python. Motivation. The Pyodide project is a Python distribution for JavaScript runtimes.
PEP 3107 introduced syntax for function annotations, but the semantics were deliberately left undefined. There has now been enough 3rd party usage for ...
Reference Implementation. Alternate syntax ideas. Dictionary comprehension based syntax for...Perform type manipulations with normal Python functionsMake the type-level operations more “strictly-typed”
Dec 2, 2006 ... These annotation consumers can do anything they want with a function's annotations. For example, one library might use string-based annotations ...
That is, true Python functions. A common use case for inspect.isfunction is checking for introspection: it guarantees for example that inspect.getfile() will work. Ideally, it should be possible for other classes to be treated as functions too.
Decorator Location. The first syntax point is the location of the decorators. For the following examples, we use the @syntax used in 2.4a2. Decorators ...