summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant leading zeroes in PEP references.Serhiy Storchaka2016-03-313-5/+5
|\
| * Remove redundant leading zeroes in PEP references.Serhiy Storchaka2016-03-313-5/+5
| |
* | Merge 3.5 (issue #25887)Yury Selivanov2016-02-131-0/+4
|\ \ | |/
| * Issue #25887: Raise a RuntimeError when a coroutine is awaited more than once.Yury Selivanov2016-02-131-0/+4
| |
* | Issue #25179: Documentation for formatted string literals aka f-stringsMartin Panter2016-02-132-4/+109
| | | | | | | | | | Some of the inspiration and wording is taken from the text of PEP 498 by Eric V. Smith, and the existing str.format() documentation.
* | Merge with 3.5Zachary Ware2016-02-041-1/+1
|\ \ | |/
| * Python for .NET has moved to Github.Zachary Ware2016-02-041-1/+1
| | | | | | | | Reported by Denis Akhiyarov on docs@
* | Issue #25791: Warn when __package__ != __spec__.parent.Brett Cannon2016-01-221-4/+14
| | | | | | | | | | | | | | | | | | In a previous change, __spec__.parent was prioritized over __package__. That is a backwards-compatibility break, but we do eventually want __spec__ to be the ground truth for module details. So this change reverts the change in semantics and instead raises an ImportWarning when __package__ != __spec__.parent to give people time to adjust to using spec objects.
* | Issue #25791: Raise an ImportWarning when __spec__ or __package__ areBrett Cannon2016-01-151-1/+2
| | | | | | | | | | | | | | | | not defined for a relative import. This is the start of work to try and clean up import semantics to rely more on a module's spec than on the myriad attributes that get set on a module. Thanks to Rose Ames for the patch.
* | Merge for issue #25500Brett Cannon2015-12-041-5/+4
|\ \ | |/
| * Issue #25500: Fix the language reference to not claim that importBrett Cannon2015-12-041-5/+4
| | | | | | | | | | | | statements search for __import__ in the global scope. Thanks to Sergei Lebedev for finding the documentation bug.
* | Merge: #25679: spelling fixR David Murray2015-11-201-3/+2
|\ \ | |/
| * Merge: #25679: spelling fixR David Murray2015-11-201-3/+2
| |\
| | * #25679: spelling fixR David Murray2015-11-201-3/+2
| | |
* | | Issue #25523: Merge a-to-an corrections from 3.5Martin Panter2015-11-021-2/+2
|\ \ \ | |/ /
| * | Issue #25523: Further a-to-an corrections new in 3.5Martin Panter2015-11-021-2/+2
| | |
* | | Issue #25418: Fix markup in object.__hash__ documentationBerker Peksag2015-10-161-1/+1
|\ \ \ | |/ / | | | | | | Patch by TAKASE Arihiro.
| * | Issue #25418: Fix markup in object.__hash__ documentationBerker Peksag2015-10-161-1/+1
| |\ \ | | |/ | | | | | | Patch by TAKASE Arihiro.
| | * Issue #25418: Fix markup in object.__hash__ documentationBerker Peksag2015-10-161-1/+1
| | | | | | | | | | | | Patch by TAKASE Arihiro.
* | | Issue #25161: Merge full stops from 3.5Martin Panter2015-10-102-2/+2
|\ \ \ | |/ /
| * | Issue #25161: Merge full stops from 3.4 into 3.5Martin Panter2015-10-102-2/+2
| |\ \ | | |/
| | * Issue #25161: Add full stops in documentation; patch by Takase ArihiroMartin Panter2015-10-102-2/+2
| | |
* | | Issue #12067: Merge comparisons doc from 3.5Martin Panter2015-09-231-56/+188
|\ \ \ | |/ /
| * | Issue #12067: Merge comparisons doc from 3.4 into 3.5Martin Panter2015-09-231-56/+188
| |\ \ | | |/
| | * Issue #12067: Rewrite Comparisons section in the language referenceMartin Panter2015-09-231-56/+188
| | | | | | | | | | | | | | | | | | | | | Some of the details of comparing mixed types were incorrect or ambiguous. NotImplemented is only relevant at a lower level than the Expressions chapter. Added details of comparing range() objects, and default behaviour and consistency suggestions for user-defined classes. Patch from Andy Maier.
* | | Issue #9232: Support trailing commas in function declarations.Robert Collins2015-08-111-4/+4
|/ / | | | | | | | | | | For example, "def f(*, a = 3,): pass" is now legal. Patch from Mark Dickinson.
* | 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
|\ \ | |/