This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tutorial section on function annotations is out of date re: PEP 484
Type: Stage: resolved
Components: Documentation Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gvanrossum, python-dev, shiroyuki, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2015-04-13 13:39 by zach.ware, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue23932.r1.patch shiroyuki, 2015-04-13 15:30 review
issue23932.r2.patch shiroyuki, 2015-04-13 16:00 review
Messages (6)
msg240606 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-13 13:39
(Brought up by 'Tronster' on docs@)

https://docs.python.org/3/tutorial/controlflow.html#function-annotations

In light of the PEP 484 and its clear intentions for function annotations, the tutorial section on function annotations is out of date.  It should be updated to be clear that function annotations are intended for type hints, and that other uses are no longer encouraged.  The example should also use some built-in types in a manner consistent with PEP 484.
msg240624 - (view) Author: Juti Noppornpitak (shiroyuki) * Date: 2015-04-13 15:30
I reworded to mention the coming changes regarding to PEP 484. The old writing which mention about arbitariness is moved to the end of the "function annotations" section as a warning.
msg240628 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-13 15:43
@Juti: Thanks for the patch!  I've left a review on Rietveld, which should have sent you an email (or you can get to it through the 'review' link).
msg240636 - (view) Author: Juti Noppornpitak (shiroyuki) * Date: 2015-04-13 16:00
Based on the review
msg240646 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-13 16:32
New changeset 0acb8dcb8e0c by Zachary Ware in branch '3.4':
Issue #23932: Update the tutorial section on function annotations.
https://hg.python.org/cpython/rev/0acb8dcb8e0c

New changeset 75a6774ba070 by Zachary Ware in branch 'default':
Closes #23932: Merge with 3.4
https://hg.python.org/cpython/rev/75a6774ba070
msg240647 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-13 16:33
Cleaned it up just a little bit and committed.  Thanks for the patch, Juti!
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68120
2015-04-13 16:33:03zach.waresetmessages: + msg240647
2015-04-13 16:32:27python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg240646

resolution: fixed
stage: needs patch -> resolved
2015-04-13 16:00:42shiroyukisetfiles: + issue23932.r2.patch

messages: + msg240636
2015-04-13 15:43:50zach.waresetmessages: + msg240628
2015-04-13 15:30:14shiroyukisetfiles: + issue23932.r1.patch

nosy: + shiroyuki
messages: + msg240624

keywords: + patch
2015-04-13 13:39:54zach.warecreate