Géry Ogam
4c155f738d
bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)
2019-10-29 00:04:01 -07:00
Steve Dower
894e30ce0b
bpo-38434: Fixes some audit event documentation (GH-16932)
2019-10-26 13:02:30 -07:00
Julien Palard
a45b0efdea
Doc: Add -m reference in context of code execution (GH-16045)
2019-09-12 14:19:06 +01:00
Emily Morehouse
6357c95716
bpo-35224: Additional documentation for Assignment Expressions (GH-15935)
...
Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis
https://bugs.python.org/issue35224
Automerge-Triggered-By: @matrixise
2019-09-11 07:37:12 -07:00
Andre Delfino
dc26997109
bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760)
...
https://bugs.python.org/issue33459
Automerge-Triggered-By: @matrixise
2019-09-11 06:16:11 -07:00
Steve Dower
a39a4c7439
bpo-37913: Link to NotImplemented from new docs (GH-15860)
2019-09-10 15:25:12 +01:00
Jeroen Demeyer
009ef2955d
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
2019-09-10 15:01:13 +01:00
Raymond Hettinger
0dac68f1e5
bpo-36743: __get__ is sometimes called without the owner argument ( #12992 )
2019-08-29 01:27:42 -07:00
Joannah Nanjekye
6b16d938d6
bpo-15542: Documentation incorrectly suggests __init__ called after direct __new__ call (GH-15478)
2019-08-25 23:53:11 -07:00
Raymond Hettinger
edd21129dd
bpo-32118: Simplify docs for sequence comparison (GH-15450)
2019-08-24 10:43:55 -07:00
Serhiy Storchaka
e9c90aa431
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269)
2019-08-24 12:49:27 +03:00
Gregory P. Smith
b4be87a04a
bpo-32912: Revert SyntaxWarning on invalid escape sequences. (GH-15195)
...
DeprecationWarning will continue to be emitted for invalid escape
sequences in string and bytes literals just as it did in 3.7.
SyntaxWarning may be emitted in the future. But per mailing list
discussion, we don't yet know when because we haven't settled on how to
do so in a non-disruptive manner.
(Applies 4c5b6bac24
to the master branch).
(This is https://github.com/python/cpython/pull/15142 for master/3.9)
https://bugs.python.org/issue32912
Automerge-Triggered-By: @gpshead
2019-08-10 00:19:07 -07:00
Jörn Heissler
c8a35417db
bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
...
… as proposed in PEP 572; key is now evaluated before value.
https://bugs.python.org/issue35224
2019-06-22 07:40:55 -07:00
Ivan Levkivskyi
8bcf2629a2
More updates to the annotated assignments docs (GH-13794)
2019-06-04 11:37:46 +01:00
Ivan Levkivskyi
82eac26a73
Update the annotated assignment docs (GH-13757)
2019-06-03 00:41:00 +01:00
Serhiy Storchaka
bdbad71b9d
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
2019-06-02 00:05:48 +03:00
Pablo Galindo
cd74e66a8c
bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726)
2019-06-01 18:08:04 +01:00
Serhiy Storchaka
70c5f2ae6e
Use more PEP 570 syntax in the documentation. (GH-13720)
2019-06-01 11:38:24 +03:00
Pablo Galindo
ed222a74a0
Update data model docs to include missing attributes for code objects (GH-13696)
...
Include and document co_posonlyargcount and co_kwonlyargcount
2019-05-31 12:13:04 +01:00
Antti Haapala
2f5b9dcc0a
bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761)
2019-05-30 16:19:28 -04:00
Pablo Galindo
29cb21ddb9
Regenerate topics file (GH-13642)
2019-05-29 22:59:00 +01:00
Pablo Galindo
b76302ddd0
bpo-36540: Documentation for PEP570 - Python positional only arguments ( #13202 )
...
* bpo-36540: Documentation for PEP570 - Python positional only arguments
* fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments
* Update reference for compound statements
* Apply suggestions from Carol
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* Update Doc/tutorial/controlflow.rst
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* Add extra bullet point and minor edits
2019-05-28 16:45:32 -07:00
divyag9
778a910758
bpo-34682: Wording and grammatical changes to the doc( https://docs.python.org/3 ) (GH-13120)
...
https://bugs.python.org/issue34682
2019-05-13 06:05:20 -07:00
Johnny Gérard
4ef9b8e505
Correct misspelling (GH-11470)
2019-05-12 23:39:32 -04:00
Benjamin Peterson
3aca40d3cb
closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214)
...
Adds ㋿.
2019-05-08 20:59:35 -07:00
Logan Jones
ae2c32f32b
bpo-36798: Updating f-string docs for := use case (GH-13107)
2019-05-06 11:32:44 -05:00
Catherine Alvarado
5e98f05e55
bpo-36166: Change to rst datamodel file. (GH-13089)
2019-05-04 17:54:35 -04:00
Andre Delfino
a8a79cacca
Improve grammar on async context managers and shorten text (GH-12379)
2019-05-03 08:08:10 -07:00
Andre Delfino
5861cddf76
Don't use the LHS/RHS acronym in Simple statements (GH-12996)
...
Prefer the full wording instead, as it is more meaningful for someone not familiar with the terms.
Also, LFS/RHS is not used anywhere else in the documentation, while left/right-hand side mentions are common.
2019-05-03 07:59:05 -07:00
Géry Ogam
ee88af3f4f
Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer None ( #10376 )
...
Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer `None` _after_ calling the importlib._bootstrap._init_module_attrs function.
See:
* https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none
* https://bugs.python.org/issue35181
2019-05-01 13:08:17 -07:00
Joannah Nanjekye
70bf713617
bpo-30840: Document relative imports ( #12831 )
...
* document relative imports
* 📜 🤖 Added by blurb_it.
* fix indentation error
* remove indentation
* Document relative imports
* Document relative imports
* remove from ...package
* Document relative imports
* remove trailing space
* Document relative imports
* Document relative imports
2019-04-25 01:14:44 +10:00
Jules Lasne (jlasne)
1fc5bf2ff2
Doc: Fixed missing punctuation in datamodel.rst (GH-12581)
2019-03-27 11:10:33 +01:00
Benjamin Peterson
738c19f4c5
closes bpo-33376: Update to Unicode 12.0.0. (GH-12256)
2019-03-09 16:25:55 -08:00
Martijn Pieters
b727239575
closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)
...
Methods are always bound, and `__self__` can no longer be `NULL`
(`method_new()` and `PyMethod_New()` both explicitly check for this).
Moreover, once a bound method is bound, it *stays* bound and won't be re-bound
to something else, so the section in the datamodel that talks about accessing
an methods in a different descriptor-binding context doesn't apply any more in
Python 3.
2019-03-04 21:19:34 -08:00
Raymond Hettinger
7463884f69
Document other performance implication for __slots__ (GH-11974)
2019-02-21 03:34:04 -08:00
Pierre Glaser
df8d2cde63
bpo-35911: add cell constructor (GH-11771)
...
Add a cell constructor, expose the cell type in the types module.
2019-02-07 19:36:48 +00:00
Cheryl Sabella
b7105c9c96
bpo-35566: Add links to annotation glossary term (GH-11291)
2018-12-23 21:09:09 -08:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
Andre Delfino
55f41e45b4
Correct a couple of unbalanced parenthesis. (GH-10779)
2018-12-05 21:45:30 +02:00
Andre Delfino
1ce853f377
Move __missing__ after __delitem__ in Data model. (GH-10923)
2018-12-05 21:42:44 +02:00
wim glenn
a48e0eb967
Fix outdated info in datamodel about dicts (GH-9807)
2018-11-16 20:58:19 +09:00
Andrés Delfino
c2ccac7b9f
bpo-33816: Remove outdated metaclass example (GH-7566)
2018-11-16 20:41:55 +09:00
Julien Palard
082875dcd6
bpo-33878: Doc: Fix missing case by simplifying. (GH-7762)
...
The documentation was not covering multiple targets enclosed by
parenthesis nor multiple targets enclosed by brackets, adding them all
would be heavy, an else cover them all and is lighter to read.
2018-11-12 00:59:39 +01:00
Andrés Delfino
b086c8afdb
bpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)
...
https://bugs.python.org/issue33699
2018-11-11 11:33:51 -08:00
Andrés Delfino
bfe1839aa9
Add link to PEP 525 in Expressions. (GH-10333)
2018-11-07 20:12:12 +02:00
Andrés Delfino
cdb96f45b6
Add future_stmt to simple_stmt production list. (GH-8239)
2018-11-07 19:32:18 +02:00
Andrés Delfino
ea6a28c9f7
Mark -c and -O as command line options in reStructuredText. (GH-10103)
2018-11-07 19:06:45 +02:00
Denis Osipov
0bee3c36d4
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
...
https://bugs.python.org/issue35119
2018-11-06 01:53:21 +00:00
Serhiy Storchaka
913876d824
bpo-35054: Add yet more index entries for symbols. (GH-10121)
2018-10-28 13:41:26 +02:00
Andrés Delfino
95f68b10d5
Fix mistakes on function coroutines related definitions (GH-9871)
...
Fix a bug I introduced in #9864 by which coroutines are treated as synonymous of function coroutines.
Also, fix the same mistake (coroutines == function coroutines) already present in other parts of the reference.
I'm very sorry for the hassle.
2018-10-28 03:41:57 -07:00
Serhiy Storchaka
ddb961d2ab
bpo-35054: Add more index entries for symbols. (GH-10064)
2018-10-26 09:00:49 +03:00
Andrés Delfino
0f14fc1a7c
bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294)
2018-10-20 01:31:15 +02:00
Serhiy Storchaka
6543912c90
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
...
for invalid escape sequences in string and bytes literals.
2018-10-19 17:42:06 +03:00
Andrés Delfino
c8bb467f40
Update compound_stmts.rst ( #9864 )
2018-10-14 11:18:16 +03:00
Tony Flury
ad8a000420
closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982)
...
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-14 10:48:50 -07:00
Berker Peksag
3c1b590472
Fix HTML formatting in datamodel.rst (GH-8693)
2018-08-06 23:52:49 +03:00
Andrés Delfino
6921ef7bef
Use 'for example' instead of 'in other words' in compound statement doc (GH-8401)
2018-07-30 11:44:35 -07:00
Andrés Delfino
e42b705188
Fix typo: variables(s) (GH-8482)
...
Remove extra `(s)` in the documentation of `compound_stmts`.
2018-07-26 16:35:23 +01:00
Andrés Delfino
caccca78e4
bpo-33702: Add some missing links in production lists and do a little polish (GH-7259)
2018-07-07 23:24:46 +03:00
Andrés Delfino
c9d43c702a
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
...
The statement is true for Windows (and macOS) also.
2018-06-22 17:31:03 -04:00
Andrés Delfino
695118600f
bpo-33847: Add '@' operator entry to index (GH-7669)
2018-06-15 15:23:00 -04:00
Andrés Delfino
4fddd4e406
bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672)
...
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
2018-06-15 14:24:25 -04:00
Ammar Askar
0aa17ee6a7
bpo-33766: Document that end of file or string is a newline (GH-7383)
2018-06-09 19:49:39 -04:00
Benjamin Peterson
7c69c1c0fb
update to Unicode 11.0.0 (closes bpo-33778) (GH-7439)
...
Also, standardize indentation of generated tables.
2018-06-06 20:14:28 -07:00
Zach Mitchell
00818c8ffd
Fix typo in datamodel.rst (GH-6964)
...
This is a simple grammatical fix correcting "...object whose `__self__` attributes is ..." to "...object whose `__self__` attribute is ...".
2018-06-02 07:29:47 -07:00
Andrés Delfino
268cc7c3f8
Fix lambda parameters being refered as arguments (GH-7037)
2018-05-22 07:57:45 +02:00
Serhiy Storchaka
f5e7b1999f
bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)
...
A DeprecationWarning was emitted in Python 3.6-3.7.
2018-05-20 08:48:12 +03:00
Serhiy Storchaka
8ae8e6af37
bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)
2018-05-20 08:13:52 +03:00
Elvis Pranskevichus
63536bd286
bpo-32996: The bulk of What's New in Python 3.7 (GH-6978)
2018-05-19 23:15:06 -04:00
Ivan Levkivskyi
bd5f96581b
bpo-32717: Document PEP 560 (GH-6726)
2018-05-08 19:38:41 +01:00
Brett Cannon
441d945eb3
Clarify that __path__ can't be just any value (GH-6554)
2018-04-20 16:32:46 -07:00
Serhiy Storchaka
d08972fdb9
bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447)
2018-04-11 19:15:51 +03:00
Serhiy Storchaka
fe2bbb1869
bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)
2018-03-18 09:56:52 +02:00
Serhiy Storchaka
496431ffb6
bpo-26701: Improve documentation for the rounding special methods. ( #6054 )
2018-03-10 17:18:32 +02:00
Eric Appelt
308eab979d
bpo-26701: Add documentation for __trunc__ (GH-6022)
...
`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
2018-03-10 18:44:12 +10:00
Nick Coghlan
aec7532ed3
bpo-30579: Docs for dynamic traceback creation (GH-5653)
2018-02-13 18:10:58 +10:00
Cheryl Sabella
d1f318105b
bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-4754)
...
When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
2018-02-05 12:03:22 +10:00
Serhiy Storchaka
07ca9afaa8
bpo-10544: Disallow "yield" in comprehensions and generator expressions. (GH-4564)
2018-02-04 10:53:48 +02:00
Cheryl Sabella
b299393cc3
bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464)
...
The f-string example for using datetime format specifier does not match the given output.
Changed the format from %b to %B so it matches the output of "January".
2018-01-31 16:37:51 -05:00
Cheryl Sabella
85527cf50a
bpo-27505: Add change notes in module attribute docs (GH-5320)
...
Make it clear that setting __class__ on a module has worked since 3.5,
but support for __getattr__ and __dir__ on module instances requires 3.7+
Patch by Cheryl Sabella.
2018-01-27 12:40:52 +10:00
Guido van Rossum
95e4d58913
String annotations [PEP 563] ( #4390 )
...
* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form
This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.
2018-01-26 08:20:18 -08:00
İsmail Arılık
3764bb075a
Lexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH-5157)
...
In lexical analysis reference documentation, the internal link to
the string literal concatenation section was written as`.. _string-catenation:`.
Changed that to `.. _string-concatenation:`.
2018-01-11 22:18:54 -08:00
KatherineMichel
f4e21a2a72
Improve the F-strings and format specifier documentation (GH-4931)
...
Mention that the format-specifier mini language in f-strings
is the same one used by str.format.
2017-12-19 13:03:09 -08:00
Antoine Pitrou
4b965930e8
bpo-32377: improve __del__ docs and fix mention about resurrection ( #4927 )
...
* Fix #32377 : improve __del__ docs and fix mention about resurrection
* Mention that CPython only calls __del__ once.
2017-12-19 19:48:45 +01:00
Mariatta
d924fa523d
F-strings docs: link to Format Specifiers (GH-4888)
...
Link to the Format Specification Mini Language section from f-strings' documentation.
2017-12-15 10:07:01 -08:00
Ivan Levkivskyi
5364b5cd75
bpo-32225: Implementation of PEP 562 ( #4731 )
...
Implement PEP 562: module __getattr__ and __dir__.
The implementation simply updates module_getattro and
module_dir.
2017-12-14 11:59:44 +01:00
Benjamin Peterson
42aa93b8ff
closes bpo-31650: PEP 552 (Deterministic pycs) implementation ( #4575 )
...
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.
While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:
- The core changes to importlib to understand how to read, validate, and
regenerate hash-based pycs.
- Support for generating hash-based pycs in py_compile and compileall.
- Modifications to our siphash implementation to support passing a custom
key. We then expose it to importlib through _imp.
- Updates to all places in the interpreter, standard library, and tests that
manually generate or parse pyc files to grok the new format.
- Support in the interpreter command line code for long options like
--check-hash-based-pycs.
- Tests and documentation for all of the above.
2017-12-09 10:26:52 -08:00
Serhiy Storchaka
73a7e9b10b
bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)
...
The current behaviour of yield expressions inside comprehensions and
generator expressions is essentially an accident of implementation - it
arises implicitly from the way the compiler handles yield expressions inside
nested functions and generators.
Since the current behaviour wasn't deliberately designed, and is inherently
confusing, we're deprecating it, with no current plans to reintroduce it.
Instead, our advice will be to use a named nested generator definition
for cases where this behaviour is desired.
2017-12-01 14:54:17 +10:00
Berker Peksag
7c9da3e5ba
Remove redundant 'exc = True' line (GH-4357)
...
It can be removed after c28890fb42
2017-11-11 17:55:05 +03:00
Tom Floyer
bf9d317626
bpo-31810: added missing keywords to docs. ( #4140 )
...
async and await keywords has been merged into upstream, but they are
all missing in the lexical analysis docs. This change adds them to the
appropriate keywords section in documentation.
2017-11-08 12:31:26 -05:00
Barry Warsaw
93952f8815
Fix a grammatical problem and reword for clarity. ( #4257 )
...
bpo-31936
2017-11-03 13:45:46 -07:00
Barry Warsaw
191e313820
bpo-31799: Make module.__spec__ more discoverable ( #4010 )
...
bpo-31799: Make module.__spec__ more discoverable
2017-10-17 15:52:38 -04:00
Yury Selivanov
b8ab9d3fc8
bpo-31708: Allow async generator expressions in synchronous functions ( #3905 )
2017-10-06 02:58:28 -04:00
Yury Selivanov
faa135acbf
bpo-31709: Drop support for asynchronous __aiter__. ( #3903 )
2017-10-06 02:08:57 -04:00
kms70847
8d59aca4a9
Fix typo in Simple Statements documentation (GH-3809)
...
Replace "restriction" with "restrictions".
2017-09-28 12:54:48 -07:00
Guilherme Caminha
4a2d00cb45
bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691)
...
- Remove the second mention about the `u` prefix
- Remove the second mention about numeric literals do not include a sign
2017-09-25 16:16:54 -07:00
svelankar
9b47af6537
bpo-31501: Operator precedence description for arithmetic operators ( #3633 )
2017-09-17 17:56:16 -07:00
Mariatta
63c591c0b0
bpo-31487: Update F-strings doc example (GH-3627)
...
Shorten the comment to: "using integer format specifier"
2017-09-17 07:43:31 -07:00
Mariatta
f361897069
Improve f-strings documentation (GH-3604)
...
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
2017-09-16 11:46:43 -07:00
Louie Lu
b8d1b9d7c6
Mention enum as an ex ( #2982 )
2017-09-12 21:44:14 -07:00