Miss Islington (bot)
adef569278
[3.13] gh-120521: clarify except* documentation to allow tuples (GH-120523) ( #120750 )
...
(cherry picked from commit 58b3f11176
)
Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-19 12:07:04 -07:00
Miss Islington (bot)
29bbd5f8e4
[3.13] annotations: expand documentation on "simple" assignment targets (GH-120535) ( #120555 )
...
This behavior is rather surprising and it was not clearly specified.
(cherry picked from commit 9e0b11eb21
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-15 15:35:57 +00:00
Miss Islington (bot)
cf8f292a36
[3.13] gh-118934: Fix PyEval_GetLocals docs (PEP 667) (GH-119934)
...
PEP 667's description of the planned changes to PyEval_GetLocals
was internally inconsistent when accepted, so the docs added for
gh-74929 didn't match either the current behaviour or the intended
behaviour once gh-118934 is fixed.
This PR updates the documentation and 3.13 What's New to match the
intended behaviour (once gh-118934 is fixed).
It also tidies up lingering references to `f_locals` always being a
dictionary (this hasn't been true since at least when custom
namespace support for class statement execution was added)
(cherry picked from commit fd6cd621e0
)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-02 05:57:17 +00:00
Miss Islington (bot)
24e3a8a9a6
[3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) ( #119869 )
...
gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fdd0a
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-05-31 17:27:55 +00:00
Miss Islington (bot)
db64dae745
[3.13] gh-74929: PEP 667 general docs update (gh-119291)
...
* expand on What's New entry for PEP 667 (including porting notes)
* define 'optimized scope' as a glossary term
* cover comprehensions and generator expressions in locals() docs
* review all mentions of "locals" in documentation (updating if needed)
* review all mentions of "f_locals" in documentation (updating if needed)
(cherry picked from commit e870c852c0
)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-05-21 21:35:26 +10:00
Serhiy Storchaka
153b3f7530
gh-118465: Add __firstlineno__ attribute to class (GH-118475)
...
It is set by compiler with the line number of the first line of
the class definition.
2024-05-06 12:02:37 +03:00
Guido van Rossum
9c13d9e37a
gh-74929: Rudimentary docs for PEP 667 ( #118581 )
...
This is *not* sufficient for the final 3.13 release, but it will do for beta 1:
- What's new entry
- Updated changelog entry (news blurb)
- Mention the proxy for f_globals in the datamodel and Python frame object docs
This doesn't have any C API details (what's new refers to the PEP).
2024-05-05 15:31:26 +00:00
Jelle Zijlstra
ca269e58c2
gh-116126: Implement PEP 696 ( #116129 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-03 06:17:32 -07:00
Quazi Irfan
1558d99316
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global ( #114009 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-20 18:42:51 -07:00
Irit Katriel
8a01fd7b9b
gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)
...
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 12:57:31 +02:00
Hugo van Kemenade
7d0be7aea5
Add 'The Python 2.3 Method Resolution Order' ( #116435 )
2024-04-15 13:01:15 +03:00
Adorilson Bezerra
c2276176d5
Add information about negative indexes to sequence datamodel doc ( #110903 )
...
Co-authored by Terry Jan Reedy
2024-03-25 18:34:20 -04:00
Terry Jan Reedy
025ef7a5f7
gh-56374: Clarify documentation of nonlocal ( #116942 )
...
Define 'nonlocal scopes' in a way that excludes class scopes.
Rearrange the rest of the doc. Add "Programmer's note".
2024-03-19 13:55:21 -04:00
Sunghyun Kim
7f64ae30dd
gh-107607: Update comment about utf-8 BOM being ignored ( #107858 )
...
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-19 11:51:12 -04:00
Terry Jan Reedy
4e45c6c54a
gh-116881: Remove erroneous or redundant grammar NULL (GH-116885)
...
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'. In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>. Remove it there.
2024-03-18 10:31:13 +01:00
Serhiy Storchaka
808a77612f
gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298)
2024-03-07 10:05:03 +02:00
Gouvernathor
67f742e03a
gh-72971: Clarify the special no-TypeError behavior for equality ( #110729 )
2024-03-03 00:45:48 +00:00
Gouvernathor
2713c2abc8
gh-104219: Document that idunders can return NotImplemented ( #104220 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 16:51:47 +01:00
Erlend E. Aasland
dbe44f150c
Docs: mark up NotImplemented using the :data: role throughout the docs ( #116135 )
2024-02-29 20:46:12 +00:00
Adorilson Bezerra
f7455864f2
Erase some unnecessary quotes on data model doc ( #113521 )
...
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
2024-02-24 19:16:19 -05:00
Daler
0c80da4c14
gh-115572: Move `codeobject.replace()` docs to the data model ( #115631 )
2024-02-18 14:13:46 +00:00
Christophe Papazian
de07941729
gh-115405: add versionadded tag for co_qualname in code objects documentation ( #115411 )
2024-02-13 16:10:00 +00:00
Nikita Sobolev
e19103a346
gh-114552: Update `__dir__` method docs: it allows returning an iterable ( #114662 )
2024-02-10 08:34:23 +00:00
Terry Jan Reedy
a1332a99cf
Clarify one-item tuple ( #114745 )
...
A 'single tuple' means 'one typle, of whatever length.
Remove the unneeded and slight distracting parenthetical 'singleton' comment.
2024-01-30 18:40:54 +00:00
Nikita Sobolev
a384b20c0c
gh-101100: Fix sphinx warnings in `reference/import.rst` ( #114646 )
2024-01-27 07:30:21 -07:00
Hugo van Kemenade
8ccd1ba461
gh-101100: Fix Sphinx warnings in `reference/expressions.rst` ( #114194 )
2024-01-22 18:21:14 +02:00
cdzhan
b04c5005cc
Fix the confusing "User-defined methods" reference in the datamodel ( #114276 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-21 03:45:38 +00:00
Sergey B Kirpichev
029ecee10d
gh-114070: fix token reference warnings in expressions.rst ( #114169 )
2024-01-17 18:39:50 +02:00
InSync
a47353d587
datamodel: Fix a typo in ``object.__init_subclass__`` ( #111599 )
2024-01-12 22:59:24 +00:00
Ned Batchelder
e68806c712
Docs: Amend codeobject.co_lines docs; end number is exclusive ( #113970 )
...
The end number should be exclusive, not inclusive.
2024-01-12 16:04:14 +01:00
Serhiy Storchaka
a8629816c6
gh-113664: Improve style of Big O notation (GH-113695)
...
Use cursive to make it looking like mathematic formulas.
2024-01-10 15:01:18 +02:00
Alex Waygood
f1f8392432
Document the `co_lines` method on code objects ( #113682 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 19:29:24 +00:00
John D. McDonald
8ff44f8554
gh-81094: Refer to PEP 318 in compound_statements.rst ( #113588 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-02 10:40:14 +02:00
Raymond Hettinger
6a5b4736e5
gh-113313: Note that slice support is not required for all sequences. (gh-113377)
2023-12-21 15:54:59 -06:00
Rodrigo Girão Serrão
5a7cc667f8
Fix typo in datamodel docs ( #113314 )
...
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-12-20 11:58:38 +00:00
Hugo van Kemenade
32d87a8899
Docs: Add label to grammar spec for linking from PEPs ( #113235 )
2023-12-17 12:23:14 -07:00
Alex Waygood
4b3cb082da
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` ( #113107 )
2023-12-14 13:30:57 +00:00
Alex Waygood
d05a180350
gh-101100: Improve docs on exception attributes (GH-113057)
...
* Improve docs on exception attributes
* thanks sphinx-lint
* fix doctests
* argh, okay, give up on doctests
* Various improvements
2023-12-13 10:59:36 -08:00
Alex Waygood
81a15ea74e
gh-101100: Further improve docs on function attributes ( #113001 )
2023-12-12 20:21:12 +00:00
Alex Waygood
4c5b9c107a
gh-101100: Improve documentation on function attributes ( #112933 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-11 12:00:42 +02:00
Hugo van Kemenade
5bf7580d72
Docs: Use 'f-strings' as header ( #112888 )
2023-12-10 10:39:51 +02:00
Alex Waygood
96f64a2b1b
gh-101100: Improve documentation of `TracebackType` attributes ( #112884 )
2023-12-09 22:43:53 +00:00
Alex Waygood
ed21d0c1f4
gh-101100: Improve documentation for attributes on instance methods ( #112832 )
2023-12-08 13:18:53 +00:00
Alex Waygood
e9707d3c3d
gh-101100: Improve documentation of code object attributes ( #112781 )
2023-12-06 20:15:46 +00:00
Alex Waygood
d109f637c0
gh-101100: Properly document frame object attributes ( #112735 )
2023-12-05 19:27:59 +00:00
Alex Waygood
2f20cafdbf
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs ( #112737 )
2023-12-05 09:59:52 +00:00
Alex Waygood
45650d1c47
gh-101100: Fix most Sphinx nitpicks in `inspect.rst` ( #112662 )
2023-12-03 17:32:49 +00:00
Raymond Hettinger
97f8f28b3e
gh-112331: Fix reference manual description of attribute lookup mechanics (gh-112375)
2023-11-25 16:20:53 -06:00
Terry Jan Reedy
9a2f25d374
gh-111944: Add assignment expression parentheses requirements ( #111977 )
...
gh-111944: Clarify where assignment expressions require ()s
Augment the list of places where parentheses are
required around assignnment statements. In particular,
'a := 0' and 'a = b := 1' are syntax errors.
2023-11-12 19:06:50 -05:00
Irit Katriel
13405ecffd
gh-79932: raise exception if frame.clear() is called on a suspended frame ( #111792 )
2023-11-07 08:49:30 +00:00