[Python-Dev] PEP 484: difference between tuple and () (original) (raw)

Jean-Patrick Francoia jeanpatrick.francoia at gmail.com
Wed Nov 8 17:01:42 EST 2017


This is my first post on this list, so please don't kill me if I ask it in the wrong place, or if the question is stupid.

I asked this question on Stack Overflow already:

https://stackoverflow.com/questions/47163048/python-annotations-difference-between-tuple-and

In very short, which form is correct ?

|deffunc()->Tuple[int,int] |||

|| But this requires to import the typing module.

Or this (doesn't crash):

|deffunc()->(int,int): | || || -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171108/e5ce881f/attachment.html>



More information about the Python-Dev mailing list