Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(605)

Side by Side Diff: Doc/whatsnew/3.3.rst

Issue 11682: PEP 380 reference implementation for 3.3
Patch Set: Created 7 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/dis.rst ('k') | Grammar/Grammar » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 **************************** 1 ****************************
2 What's New In Python 3.3 2 What's New In Python 3.3
3 **************************** 3 ****************************
4 4
5 :Author: Raymond Hettinger 5 :Author: Raymond Hettinger
6 :Release: |release| 6 :Release: |release|
7 :Date: |today| 7 :Date: |today|
8 8
9 .. Rules for maintenance: 9 .. Rules for maintenance:
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 can now be written without the :mod:`errno` import and without manual 174 can now be written without the :mod:`errno` import and without manual
175 inspection of exception attributes:: 175 inspection of exception attributes::
176 176
177 try: 177 try:
178 with open("document.txt") as f: 178 with open("document.txt") as f:
179 content = f.read() 179 content = f.read()
180 except FileNotFoundError: 180 except FileNotFoundError:
181 print("document.txt file is missing") 181 print("document.txt file is missing")
182 except PermissionError: 182 except PermissionError:
183 print("You are not allowed to read document.txt") 183 print("You are not allowed to read document.txt")
184
185
186 PEP 380: Syntax for Delegating to a Subgenerator
187 ================================================
188
189 PEP 380 adds the ``yield from`` expression, allowing a generator to delegate
190 part of its operations to another generator. This allows a section of code
191 containing 'yield' to be factored out and placed in another generator.
192 Additionally, the subgenerator is allowed to return with a value, and the
193 value is made available to the delegating generator.
194
195 While designed primarily for use in delegating to a subgenerator, the ``yield
196 from`` expression actually allows delegation to arbitrary subiterators.
197
198 (Implementation by Greg Ewing, integrated into 3.3 by Renaud Blanch, Ryan
199 Kelly and Nick Coghlan)
184 200
185 201
186 Other Language Changes 202 Other Language Changes
187 ====================== 203 ======================
188 204
189 Some smaller changes made to the core Python language are: 205 Some smaller changes made to the core Python language are:
190 206
191 * Stub 207 * Stub
192 208
193 Added support for Unicode name aliases and named sequences. 209 Added support for Unicode name aliases and named sequences.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 604
589 .. Issue #11591: When :program:`python` was started with :option:`-S`, 605 .. Issue #11591: When :program:`python` was started with :option:`-S`,
590 ``import site`` will not add site-specific paths to the module search 606 ``import site`` will not add site-specific paths to the module search
591 paths. In previous versions, it did. See changeset for doc changes in 607 paths. In previous versions, it did. See changeset for doc changes in
592 various files. Contributed by Carl Meyer with editions by Éric Araujo. 608 various files. Contributed by Carl Meyer with editions by Éric Araujo.
593 609
594 .. Issue #10998: -Q command-line flags are related artifacts have been 610 .. Issue #10998: -Q command-line flags are related artifacts have been
595 removed. Code checking sys.flags.division_warning will need updating. 611 removed. Code checking sys.flags.division_warning will need updating.
596 Contributed by Éric Araujo. 612 Contributed by Éric Araujo.
597 613
OLDNEW
« no previous file with comments | « Doc/library/dis.rst ('k') | Grammar/Grammar » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+