summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* Issue #4395: Better testing and documentation of binary operators.Robert Collins2015-08-061-9/+13
|\ | | | | | | Patch by Martin Panter.
| * Issue #4395: Better testing and documentation of binary operators.Robert Collins2015-08-061-9/+13
| | | | | | | | Patch by Martin Panter.
* | Issue #24531: Document that encoding lines cannot follow non-comment lines.Robert Collins2015-08-061-2/+4
|\ \ | |/ | | | | Patch from Terry Reedy
| * Issue #24531: Document that encoding lines cannot follow non-comment lines.Robert Collins2015-08-061-2/+4
| | | | | | | | Patch from Terry Reedy
* | Merge issue #24129 from 3.4Nick Coghlan2015-08-051-62/+101
|\ \ | |/
| * Issue #24129: Clarify reference docs for name resolution.Nick Coghlan2015-08-051-62/+101
| | | | | | | | | | | | | | | | This includes removing the assumption that readers will be familiar with the name resolution scheme Python used prior to the introduction of lexical scoping for function namespaces. Patch by Ivan Levkivskyi.
* | docs: Fix productionlist for async def functionsYury Selivanov2015-08-011-1/+1
| |
* | Issue #24713: Use importlib.reload() in import reference document.Berker Peksag2015-07-251-1/+1
|\ \ | |/ | | | | | | | | | | imp.reload() was deprecated in Python 3.4 and changed to call importlib.reload(). Patch by Petr Viktorin.
| * Issue #24713: Use importlib.reload() in import reference document.Berker Peksag2015-07-251-1/+1
| | | | | | | | | | | | | | imp.reload() was deprecated in Python 3.4 and changed to call importlib.reload(). Patch by Petr Viktorin.
* | Issue #24619: New approach for tokenizing async/await.Yury Selivanov2015-07-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes how one-line async-defs and defs are tracked by tokenizer. It allows to correctly parse invalid code such as: >>> async def f(): ... def g(): pass ... async = 10 and valid code such as: >>> async def f(): ... async def g(): pass ... await z As a consequence, is is now possible to have one-line 'async def foo(): await ..' functions: >>> async def foo(): return await bar()
* | merge 3.4 (#24610)Benjamin Peterson2015-07-111-1/+1
|\ \ | |/
| * fix normalization example (closes #24610)Benjamin Peterson2015-07-111-1/+1
| | | | | | | | Patch by Chris Angelico
* | upgrade to Unicode 8.0.0Benjamin Peterson2015-06-271-2/+2
| |
* | Issue #24439: Improve PEP 492 related docs.Yury Selivanov2015-06-243-21/+78
| | | | | | | | Patch by Martin Panter.
* | Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-221-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
* | Merge with 3.4Terry Jan Reedy2015-06-121-1/+1
|\ \ | |/
| * Closes issue #24405: mark set display as code.Terry Jan Reedy2015-06-121-1/+1
| |
* | mergeRaymond Hettinger2015-05-221-2/+1
|\ \ | |/
| * Issue #24219: Remove duplicate literal in docs.Raymond Hettinger2015-05-221-2/+1
| |
* | Issue 24180: Documentation for PEP 492 changes.Yury Selivanov2015-05-213-1/+234
| |
* | PEP 479: Change StopIteration handling inside generators.Yury Selivanov2015-05-091-6/+6
| | | | | | | | Closes issue #22906.
* | Issue 24088: Clarify semantics of yield expression (merge from 3.4).Guido van Rossum2015-05-051-1/+1
|\ \ | |/
| * Issue 24088: Clarify semantics of yield expression.Guido van Rossum2015-05-051-1/+1
| |
* | merge 3.4 (#24049)Benjamin Peterson2015-04-241-4/+0
|\ \ | |/
| * remove dead *-import checking code (closes #24049)Benjamin Peterson2015-04-241-4/+0
| |
* | Issue #24029: Document the name binding behavior for submodule imports.Barry Warsaw2015-04-221-0/+35
|\ \ | |/
| * Issue #24029: Document the name binding behavior for submodule imports.Barry Warsaw2015-04-221-0/+35
| |
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-1/+1
| | | | | | | | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* | Issue #23912: Fix code formatting in datamodel.rst.Berker Peksag2015-04-111-3/+3
|\ \ | |/ | | | | Patch by James Edwards.
| * Issue #23912: Fix code formatting in datamodel.rst.Berker Peksag2015-04-111-3/+3
| | | | | | | | Patch by James Edwards.
* | Merge with 3.4Zachary Ware2015-02-201-1/+1
|\ \ | |/
| * Fix a typo pointed out on docs@Zachary Ware2015-02-201-1/+1
| |
* | Issue22988: clarify yield and exception blocksEthan Furman2015-01-151-4/+5
|\ \ | |/
| * Issue22988: clarify yield and exception blocksEthan Furman2015-01-151-4/+5
| |
* | Issue20467: clarify __init__'s roleEthan Furman2015-01-151-7/+11
|\ \ | |/
| * Issue20467: clarify __init__'s roleEthan Furman2015-01-151-7/+11
| |\
| | * Issue20467: clarify __init__'s roleEthan Furman2015-01-151-7/+11
| | |
| | * #19953: Clarify the wording of the augmented assignment discussion.R David Murray2014-03-091-5/+7
| | | | | | | | | | | | | | | Patch by Priya Pappachan, based on suggestions from Terry Reedy and myself.
* | | Issue #23014: Make importlib.abc.Loader.create_module() required whenBrett Cannon2015-01-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | importlib.abc.Loader.exec_module() is also defined. Before this change, create_module() was optional **and** could return None to trigger default semantics. This change now reduces the options for choosing default semantics to one and in the most backporting-friendly way (define create_module() to return None).
* | | Merge 3.4Terry Jan Reedy2014-12-101-0/+6
|\ \ \ | |/ /
| * | Issue #23006: Improve the documentation and indexing of dict.__missing__.Terry Jan Reedy2014-12-101-0/+6
| | | | | | | | | | | | | | | Add an entry in the language datamodel special methods section. Revise and index its discussion in the stdtypes mapping/dict section.
* | | Merge: #22918: Drop obsolete mention of 'keys' in datamodel __iter__ docs.R David Murray2014-12-101-2/+1
|\ \ \ | |/ /
| * | #22918: Drop obsolete mention of 'keys' in datamodel __iter__ docs.R David Murray2014-12-101-2/+1
| | | | | | | | | | | | Patch by Chaitanya Agrawal.
* | | Issue22780: reword NotImplemented docs to emphasise shouldEthan Furman2014-11-271-1/+6
|\ \ \ | |/ /
| * | (3.4) Issue22780: reword NotImplemented docs to emphasise shouldEthan Furman2014-11-271-1/+6
| | |
* | | Issue #22834: Have import suppress FileNotFoundError when the currentBrett Cannon2014-11-211-0/+9
| | | | | | | | | | | | | | | | | | working directory no longer exists. Thanks to Martin Panter for the bug report.
* | | Issue #22242: Try to make some import-related loader details clearer.Brett Cannon2014-11-071-1/+2
| | | | | | | | | | | | Thanks to Jon Poler for pointing this out.
* | | merge with 3.4Georg Brandl2014-10-316-45/+37
|\ \ \ | |/ /
| * | #22613: remaining corrections in extending/reference docs (thanks Jacques ↵Georg Brandl2014-10-316-45/+37
| | | | | | | | | | | | Ducasse)
* | | merge with 3.4Georg Brandl2014-10-292-2/+2
|\ \ \ | |/ /