[Python-ideas] Proposal: Use mypy syntax for function annotations

Chris Angelico rosuav at gmail.com
Fri Aug 15 02:29:21 CEST 2014


On Fri, Aug 15, 2014 at 10:14 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> I don't think this one is justified. At the very least, I think the
> decision to deprecate or not should be deferred until at least 3.7. It's
> enough to say that:
>
> - you can use function annotations for type checking; or
>
> - you can use function annotations for something else;

But who is "you"? Presumably the application author. What about
imported modules - what will they use annotations for? Will
conflicting uses break stuff? Or, conversely, will every use of
annotations have to be meta-annotated with its purpose, to try to
avoid breaking things?

Simpler to just say "this feature is standardly used for this
purpose", and let people break that convention at their own risk if
they like. Deprecation of other options fits this.

ChrisA


More information about the Python-ideas mailing list