[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset 37fd9f73e2fa439554977cfba427bf94c1fedb6b by Miss Islington (bot) (Josh Holland) in branch '3.7': [3.7] bpo-37814: Document the empty tuple type annotation syntax (GH-15208) (GH-15262) https://github.com/python/cpython/commit/37fd9f73e2fa4395549

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread Josh Holland
Change by Josh Holland : -- pull_requests: +14981 pull_request: https://github.com/python/cpython/pull/15262 ___ Python tracker ___

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Josh! The automated backport to 3.7 didn't work, that's okay, so I'll close this now. (Though if you want to experiment with the cherry-picker tool go ahead.) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset 6ad902a08814909b4d52c4000d5a10ce58516dac by Miss Islington (bot) in branch '3.8': bpo-37814: Document the empty tuple type annotation syntax (GH-15208) https://github.com/python/cpython/commit/6ad902a08814909b4d52c4000d5a10ce58516dac -

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +14980 pull_request: https://github.com/python/cpython/pull/15261 ___ Python tracker ___ __

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset 8a784af750fa82c8355903309e5089eb2b60c16b by Miss Islington (bot) (Josh Holland) in branch 'master': bpo-37814: Document the empty tuple type annotation syntax (GH-15208) https://github.com/python/cpython/commit/8a784af750fa82c8355903309e5089eb2b

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: > What is better, Tuple[()] or Literal[()]? In this context, Tuple[()] is better, as the discussion is about how to write the type of various tuples. Tuple[()] is just the edge case of the type of the empty tuple. Josh, please sign the CLA and adjust the

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-11 Thread Josh Holland
Josh Holland added the comment: PEP 586 doesn't currently allow Literal to contain tuples, so Tuple[()] is the only option. -- ___ Python tracker ___

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is better, Tuple[()] or Literal[()]? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-11 Thread Josh Holland
Change by Josh Holland : -- keywords: +patch pull_requests: +14937 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15208 ___ Python tracker ___ ___

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-10 Thread Guido van Rossum
Guido van Rossum added the comment: That’s correct. Mind making a PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-10 Thread Josh Holland
New submission from Josh Holland : The empty tuple syntax in type annotations, `Tuple[()]`, is not obvious from the examples given in the documentation (I naively expected `Tuple[]` to work); it has been documented in PEP 484[1] and in mypy[2], but not in the documentation for the typing modu