On Wed, 4 Jul 2018 at 22:07 Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> Shawn Chen wrote: > > The PEP 484 is proposing a type hint which can annotate the type of each > > parameters. How ever code written in this format can not be run for > > python3.5 and below. > > You're a bit late. Parameter annotations have been a part > of the language since at least 3.1. PEP 484 just codifies > a way of using them to represent types. > > Also, PEP 484 does specify a way of using comments to > indicate types. > Actually it does in https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code and https://www.python.org/dev/peps/pep-0484/#type-comments. So the OP's desire to specify in a comment is already specified.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com