[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5 (whatsnew)

yury.selivanov python-checkins at python.org
Tue Aug 4 18:47:24 CEST 2015


https://hg.python.org/cpython/rev/11a065d6e5f4
changeset:   97241:11a065d6e5f4
parent:      97239:0c965f6c45ef
parent:      97240:5b143ec2b614
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Tue Aug 04 12:47:12 2015 -0400
summary:
  Merge 3.5 (whatsnew)

files:
  Doc/whatsnew/3.5.rst |  22 ++++++++++++++++++++++
  1 files changed, 22 insertions(+), 0 deletions(-)


diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -246,6 +246,28 @@
    :pep:`448` -- Additional Unpacking Generalizations
 
 
+PEP 484 - Type Hints
+--------------------
+
+This PEP introduces a provisional module to provide these standard
+definitions and tools, along with some conventions for situations
+where annotations are not available.
+
+For example, here is a simple function whose argument and return type
+are declared in the annotations::
+
+  def greeting(name: str) -> str:
+      return 'Hello ' + name
+
+The type system supports unions, generic types, and a special type
+named ``Any`` which is consistent with (i.e. assignable to and from) all
+types.
+
+.. seealso::
+
+   :pep:`484` -- Type Hints
+
+
 PEP 471 - os.scandir() function -- a better and faster directory iterator
 -------------------------------------------------------------------------
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list