diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-04 16:46:57 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-04 16:46:57 (GMT) |
commit | 5df36af8b751d8acb168ad3b2fff3169dbae9ceb (patch) | |
tree | ced94f0670f4aac3b1747c999b51c846770c7f32 /Doc/whatsnew | |
parent | 216d999345e4c9aa7a387408d41a57a922b60bca (diff) | |
download | cpython-5df36af8b751d8acb168ad3b2fff3169dbae9ceb.zip cpython-5df36af8b751d8acb168ad3b2fff3169dbae9ceb.tar.gz cpython-5df36af8b751d8acb168ad3b2fff3169dbae9ceb.tar.bz2 |
whatsnew/3.5: Briefly mention PEP 484
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | 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 index 2c74afe..76d57f7 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -246,6 +246,28 @@ In dictionaries, later values will always override earlier ones:: :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 ------------------------------------------------------------------------- |