On Wed, 2021-04-14 at 22:42 +0200, Baptiste Carvello wrote: > That's assuming the syntax in the annotations doesn't diverge too > much > from the Python syntax as far as brackets etc are concerned. I must > say > I'm not too worried about typing. But the hypothetic "def foo(prec: > --precision int):" is already less readable. Will finding the closing > comma or colon always be obvious to the human reader?
To push the limit, let's add some default value: def foo(prec: --precision int = 123): ... vs. def foo(prec: "--precision int" = 123): ... And if a "type parameter" becomes numeric. For example: def foo(prec: --max bar 3000 = 123): ... vs. def foo(prec: "--max bar 3000" = 123): ... Now, the quotes seem even more readable as a delimiter. Paul
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/UITB2A657TAINAGWGRD6GCKWFC5PEBIZ/ Code of Conduct: http://python.org/psf/codeofconduct/