Steven D'Aprano wrote:
> On Sun, Dec 06, 2020 at 10:22:53AM -0000, redrad...@gmail.com wrote:
> > It would be nice to have "Typed Python" mode that
> > will look like this:
> > #!/usr/bin/env bash
> > 
> > set -e
> > python -m mypy $1
> > python $1
> > 
> > What does that mean? Why is it a bash script?

It is only example how I use what I call "Typed Python"
The same can happens under-hood, python in this "typed" mode can first run 
type-checker and then if there are no errors run script itself

> > It could be achieved by adding special flag like
> > -t (typed)
> > What does "typed" mode do?
> Why would it be "nice"? If all you want is to run mypy, you can run 
> mypy. Or any alternative type-checker, such as Pytype, Pyright, Pyre or 
> Jedi:
> https://google.github.io/pytype/
> https://github.com/Microsoft/pyright
> https://pyre-check.org/
> https://pypi.org/project/jedi
> (Jedi does a lot more than just type checking.)

It would be good to have direct support from python to run script in typed mode 
or not ...
Python can support other type checker with some option `--type-checker=<path> 
or <name>` of module that will type-check
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7MXWASAAEBCIQ2TIB6HA6ZDAZCIG6X3F/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to