[Python-ideas] TypeHinting: From variable name to type
klahnakoski at mozilla.com
Sun Oct 21 12:08:02 EDT 2018
On 2018-10-21 10:44, David Mertz wrote:
> On Fri, Oct 19, 2018 at 3:18 AM Thomas Güttler
> <guettliml at thomas-guettler.de <mailto:guettliml at thomas-guettler.de>>
> Now my idea: Per module and/or per file type hinting from variable
> Maybe a magic docstring in the __init__.py file:
> request: django.http.HttpRequest,
> In general, I like this idea; but really only on a per-file basis. A
> short header at the top would be easy enough for an IDE or linter to
> scan. But imposing the conventions project-wide feels too broad.
Maybe in a .editorconfig file? This would allow type hinting at a
number of directory levels.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas