summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
Commit message (Collapse)AuthorAgeFilesLines
* Add a mention of PYTHONBREAKPOINT to breakpoint() docs (#104430)Ned Batchelder2023-05-131-0/+7
|
* GH-97950: Use new-style index directive ('builtin') (#104164)Adam Turner2023-05-061-1/+1
| | | | | | | | | | | | | * Uncomment builtin removal in pairindextypes * Use new-style index directive ('builtin') - C API * Use new-style index directive ('builtin') - Extending * Use new-style index directive ('builtin') - Library * Use new-style index directive ('builtin') - Reference * Use new-style index directive ('builtin') - Tutorial
* GH-97950: Use new-style index directive ('statement') (#104162)Adam Turner2023-05-041-1/+1
|
* GH-97950: Use new-style index directive ('object') (#104158)Adam Turner2023-05-041-1/+1
| | | | | | | | | | | * Uncomment object removal in pairindextypes * Use new-style index directive ('object') - C API * Use new-style index directive ('object') - Library * Use new-style index directive ('object') - Reference * Use new-style index directive ('object') - Tutorial
* GH-97950: Use new-style index directive ('module') (#103996)Adam Turner2023-05-041-2/+2
| | | | | | | | | | | | | | | | | * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference * Use new-style index directive ('module') - Tutorial * Uncomment module removal in pairindextypes * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference
* GH-98040: Suppress cross-references to the removed ``imp`` module (#104131)Adam Turner2023-05-031-0/+1
| | | Suppress cross-references to imp
* gh-82012: Deprecate bitwise inversion (~) of bool (#103487)Tim Hoffmann2023-05-031-1/+1
| | | | | | | | | | | | | | The bitwise inversion operator on bool returns the bitwise inversion of the underlying int value; i.e. `~True == -2` such that `bool(~True) == True`. It's a common pitfall that users mistake `~` as negation operator and actually want `not`. Supporting `~` is an artifact of bool inheriting from int. Since there is no real use-case for the current behavior, let's deprecate `~` on bool and later raise an error. This removes a potential source errors for users. Full reasoning: https://github.com/python/cpython/issues/82012#issuecomment-1258705971 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-98040: Remove just the `imp` module (#98573)Barry Warsaw2023-04-281-1/+0
|
* gh-87864: Use correct function definition syntax in the docs (#103312)Nikita Sobolev2023-04-111-1/+1
|
* gh-81762: Clarify and simplify description of print's flush param (#103264)C.A.M. Gerlach2023-04-051-2/+3
|
* gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189)Stefan Pochmann2023-02-241-2/+2
|
* GH-84783: Make the slice object hashable (GH-101264)Furkan Onder2023-02-191-0/+3
|
* Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029)JustAnotherArchivist2023-01-141-2/+2
|
* gh-100428: Make int documentation more accurate (#100436)Shantanu2023-01-021-11/+15
| | | | | | | | | - Remove first link to lexical definition of integer literal, since it doesn't apply (differs in handling of leading zeros, base needs to be explicitly specified, unicode digits are allowed) - Better describe handling of leading zeros, unicode digits, underscores - Base 0 does not work exactly as like a code literal, since it allows Unicode digits. Link code literal to lexical definition of integer literal.
* gh-100546: Remove incorrect positional-only marker from eval (#100547)Shantanu2023-01-011-1/+1
| | | | | | All the arguments are positional-only. The current status after #99476 seems to be to not use positional-only markers in documentation, hence I've simply removed it.
* GH-100101: Clarify documentation of zip's strict option (GH-100103)JustAnotherArchivist2022-12-281-4/+14
|
* gh-100428: Make float documentation more accurate (#100437)Shantanu2022-12-241-9/+12
| | | | Previously, the grammar did not accept `float("10")`. Also implement mdickinson's suggestion of removing the indirection.
* GH-100425: Improve accuracy of builtin sum() for float inputs (GH-100426)Raymond Hettinger2022-12-231-0/+4
|
* gh-99087: Add missing newline for prompts in docs (GH-98993)Stanley2022-12-091-0/+1
| | | Add newline for prompts so copying to REPL does not cause errors.
* Doc: Make functions.html readable again. (GH-99476)Julien Palard2022-11-191-60/+60
|
* gh-94286 Fix documentation of print default param (GH-94297)Nouran Ali2022-11-061-1/+1
|
* gh-91485: Doc: Using Python syntax to document builtin Python functions. ↵Julien Palard2022-10-151-65/+84
| | | | (GH-96579)
* gh-64921: Clarify wording for open()'s newline arg (#96171)Stanley2022-10-071-2/+2
|
* gh-96397: Document that attributes need not be identifiers (#96454)Jeff Allen2022-09-291-0/+8
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-96512: Update int_max_str docs to say 3.11 (#96942)Gregory P. Smith2022-09-191-1/+1
| | | | It was unknown if it'd be before 3.11.0 when creating the original changes. It's in 3.11rc2, so 3.11 it is.
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-021-0/+7
| | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)Dong-hee Na2022-08-261-0/+2
|
* gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)Dong-hee Na2022-08-261-1/+1
|
* gh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost ↵Dong-hee Na2022-08-241-0/+2
| | | | (gh-96231)
* gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)Adam Turner2022-06-211-1/+1
| | | | | | | | | * Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)" This reverts commit 5c1f15b4b1024cbf0acc85832f0c623d1a4605fd * Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)" This reverts commit b63a620014b67a6e63d10783149c41baaf59def8.
* gh-71223: Improve rendering of some references in the docs (GH-93041)Serhiy Storchaka2022-05-211-0/+1
| | | | For example, instead of "eval()uated" (link from "eval()") show "evaluated" (link from the whole word).
* bpo-39229: fix formatting in library/functions.rst (#17857)Rafael Fontenelle2022-05-081-2/+2
| | | Missing reference of auditing event presents error when building translated documentation
* gh-92203: Add closure support to exec(). (#92204)larryhastings2022-05-061-1/+9
| | | Add a closure keyword-only parameter to exec(). It can only be specified when exec-ing a code object that uses free variables. When specified, it must be a tuple, with exactly the number of cell variables referenced by the code object. closure has a default value of None, and it must be None if the code object doesn't refer to any free variables.
* GH-89519: Deprecate classmethod descriptor chaining (#92379)Raymond Hettinger2022-05-061-0/+5
|
* gh-81488: Add recursive wording for issubclass docs (#92087)slateny2022-05-011-1/+2
|
* gh-91603: Speed up isinstance/issubclass on union types (GH-91631)Yurii Karabas2022-04-281-1/+2
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)Inada Naoki2022-04-221-6/+5
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-30718: Add information about text buffering (GH-32351)slateny2022-04-201-1/+5
|
* bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)Zackery Spytz2022-02-031-0/+3
| | | | | Calling int(a) when type(a) implements __trunc__ but not __int__ or __index__ now raises a DeprecationWarning.
* bpo-43698: do not use `...` as argument name in docs (GH-30502)Nikita Sobolev2022-01-261-1/+1
|
* Add Positional only arguments forward slash (/) to sorted() function in ↵Vivek Vashist2021-12-151-1/+1
| | | | | | | Built-in Functions document (GH-30113) sorted() function is missing forward slash (/) in Built-in Functions documentation page. Automerge-Triggered-By: GH:asvetlov
* bpo-19737: Improved the documentation for globals (GH-29823)1809092021-12-111-3/+3
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently ↵Brett Cannon2021-11-201-6/+3
| | | | | required by CPython (GH-29170) It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
* [doc] Link to section File input (GH-28941)Andre Delfino2021-11-021-1/+1
|
* bpo-44344: Document that pow can return a complex number for non-complex ↵Mark Dickinson2021-10-211-1/+4
| | | | | inputs. (GH-27853) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [docs] Improve the markup of powers (GH-28598)Serhiy Storchaka2021-09-281-2/+2
|
* bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)Raymond Hettinger2021-09-211-0/+9
|
* bpo-37330: open() no longer accept 'U' in file mode (GH-28118)Victor Stinner2021-09-021-18/+7
| | | | | open(), io.open(), codecs.open() and fileinput.FileInput no longer accept "U" ("universal newline") in the file mode. This flag was deprecated since Python 3.3.
* bpo-44135: [docs] Fix inline markup (GH-28095)Ken Jin2021-08-311-1/+1
|
* bpo-44135: Refine explanation of how passing tuples to issubclass() behaves ↵Zack Kneupper2021-08-311-3/+3
| | | | | (GH-26193) Co-authored-by: Zachary Kneupper <zachary.kneupper@gmail.com>