Commit graph

518 commits

Author SHA1 Message Date
Lysandros Nikolaou
1aeeaeb79e bpo-21314: Add a FAQ entry about positional only parameters (GH-10641) 2019-03-10 21:30:11 +10:00
Cristian Ciupitu
11fa0e48a9 Doc: fix example for iter() function. (GH-11959)
read() returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.
2019-02-21 09:53:06 +02:00
Nick Coghlan
3171df3414
Clarify U-mode deprecation in open() (GH-11646)
The previous wording could be read as saying that universal
newlines mode itself was deprecated, when it's only the 'U'
character in the mode field that should be avoided.

The update also moves the description of the 'U' mode character
out of the mode table, as the longer explanation was overly
intrusive as a table entry and overshadowed the actually useful
mode characters.
2019-01-28 02:21:11 +10:00
Chris Rands
d378b1f8ed bpo-34764: improve docs example of iter() with sentinel value (GH-11222) 2018-12-23 21:07:17 -08:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Wolfgang Maier
6bdb6f7675 fix dangling keyfunc examples in documentation of heapq and sorted (#1432)
* fix dangling mention of key=str.lower in heapq doc

* Fix dangling mention of keyfunc example for sorted()
2018-10-15 13:06:53 -06:00
Raymond Hettinger
9dfa0fe587
bpo-34637: Make the *start* argument for *sum()* visible as a keyword argument. (GH-9208) 2018-09-12 10:54:06 -07:00
Louis Sautier
3fe89dac42 bpo-34434: Update doc for bool(), float() and int() arguments (GH-8834) 2018-08-27 18:45:26 +08:00
Berker Peksag
225b055480
bpo-22057: Clarify eval() documentation (GH-8812)
If a globals dictionary without a '__builtins__' key is passed to
eval(), a '__builtins__' key will be inserted to the dictionary:

    >>> eval("print('__builtins__' in globals())", {})
    True

(As a result of this behavior, we can use the builtins
print() and globals() even if we passed a dictionary without a
'__builtins__' key to eval().)
2018-08-19 13:25:33 +03:00
Alexander Marshalov
e22072fb11 bpo-34149: Behavior of the min/max with key=None (GH-8328)
Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
2018-07-23 20:58:21 -07:00
Andrés Delfino
33aefad342 Doc: Point to Simple statements section instead of PEP (GH-8238) 2018-07-11 18:44:06 +09:00
Windson yang
3ae2e33a61 classify abs() argument type (GH-8103) 2018-07-05 16:09:53 -07:00
Andrés Delfino
bda9c3eae3 Fix the indentation in the documentation of bin() and hash() (GH-7998) 2018-06-29 12:57:10 +03:00
Andrés Delfino
a8ddf85a84 bpo-33943: Add references in the docs for logging.basicConfig (GH-7858)
Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.
2018-06-25 09:06:10 +03:00
Lisa Roach
900c48dba3 bpo-30940: Updating round() docs. (GH-6342) 2018-05-20 18:00:18 +03:00
Serhiy Storchaka
df00f04825 bpo-26701: Tweak the documentation for special methods in int(). (GH-6741) 2018-05-10 23:38:44 +10:00
Julien Palard
b3c369861b Fix superfluous if in documentation. (GH-6728) 2018-05-09 10:25:22 +03: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
Brett Cannon
f7a6ff6fca
Warn that compile() can crash when compiling to an AST object (GH-6043) 2018-03-09 13:13:32 -08:00
cocoatomo
2a3260bb03 Fix minor markup typo (#5407) 2018-01-29 00:30:48 -08:00
Éric Araujo
03b9537dc5 bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966) 2017-10-12 12:28:55 -04:00
Daisuke Miyakawa
0e61e67a57 bpo-31567: add or fix decorator markup in docs (#3959) 2017-10-12 10:39:43 -04:00
Barry Warsaw
36c1d1f1e5 PEP 553 built-in breakpoint() function (bpo-31353) (#3355)
Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests.  Closes bpo-31353
2017-10-05 12:11:18 -04:00
Łukasz Rogalski
be37beb05f Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2706) 2017-07-14 15:23:39 -04:00
Manvisha Kodali
67ba4fa467 bpo-26506: hex() documentation: mention %x % int (GH-2525) 2017-07-06 12:30:58 -07:00
Marco Buttu
e65fcde85a bpo-27200: Fix several doctests (GH-604) 2017-04-27 15:23:34 +03:00
csabella
c6db4811f9 bpo-30052: Link bytes & bytearray to stdtypes not functions (GH-1271)
Builtin container types have two potential link targets in the docs:

- their entry in the list of builtin callables
- their type documentation

This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry.
2017-04-26 15:47:01 +10:00
Joshua Diaddigo
873ef20d00 Fix a typo in Doc/library/functions.rst (GH-1117)
Replace `For object's ... ` with `For objects ...`
2017-04-13 10:31:37 -07:00
Berker Peksag
61b9ac9371 bpo-29791: Clarify that flush is keyword-only argument (#1093)
Reported by Lucio Ricardo Montero Valenzuela.
2017-04-13 15:48:18 +03:00
csabella
85deefcf61 bpo-29677: DOC: clarify documentation for round (GH-877) 2017-03-29 14:14:06 -07:00
Gerrit Holl
6003db7db5 bpo-29677: DOC: clarify documentation for round (#357)
* DOC: clarify documentation for `round`

Clarified that `round` can take a negative value for *ndigits*.

* DOC: remove trailing whitespace in previous commit

remove trailing whitespace in previous commit
2017-03-28 00:15:20 +02:00
NAKAMURA Osamu
29540cdf6c bpo-29892: Fix wrong markup on doc-lib-functions (GH-802) 2017-03-24 19:55:08 -07:00
Serhiy Storchaka
0264e46caa Issue #28763: Use double hyphens (rendered as en-dashes) in numerical ranges
in the documentation.
2016-11-26 13:49:59 +02:00
Serhiy Storchaka
c7b1a0bbe2 Issue #28763: Use double hyphens (rendered as en-dashes) in numerical ranges
in the documentation.
2016-11-26 13:43:28 +02:00
Martin Panter
99b6f28351 Merge doc fixups from 3.5 2016-11-21 04:22:22 +00:00
Martin Panter
357ed2e577 Change double hyphens (en dashes) to em (longer) dashes 2016-11-21 00:15:20 +00:00
Brett Cannon
a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Raymond Hettinger
871a3340b7 Issue 27936: Update doc for round() to indicate that None is an allowable argument. 2016-09-04 11:28:56 -07:00
Steve Dower
3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Brett Cannon
6fa7aada9b Issue #26027, #27524: Document the support for path-like objects in os and os.path.
This completes PEP 519.
2016-09-06 15:55:02 -07:00
Raymond Hettinger
bce9cbaf98 Merge 2016-09-04 11:29:13 -07:00
Berker Peksag
3f015a64b8 Issue #27157: Make only type() itself accept the one-argument form
Patch by Eryk Sun and Emanuel Barry.
2016-08-19 11:04:07 +03:00
Berker Peksag
69da9c4343 Issue #26547: Merge from 3.5 2016-06-24 09:12:20 +03:00
Berker Peksag
37e87e6ec1 Issue #26547: Remove outdated term dictproxy from vars() documentation
dictproxy was used in Python 2 and it was renamed to mappingproxy
in Python 3.3.

Patch by Julien.
2016-06-24 09:12:01 +03:00
Martin Panter
2fec611a70 Issue #24314: Merge doc links from 3.5 2016-06-18 08:20:22 +00:00
Martin Panter
bae5d81f5d Issue #24314: Fix doc links for general attributes like __name__, __dict__ 2016-06-18 03:57:31 +00:00
Brett Cannon
b08388d5f2 Issue #27182: Document os.PathLike.
Part of PEP 519.
2016-06-09 15:58:06 -07:00
Ethan Furman
d62548afed issue27186: add open/io.open; patch by Jelle Zijlstra 2016-06-04 14:38:43 -07:00
R David Murray
dd4fcf52f4 #26829: Clarify that namespace is copied to a new __dict__ in instance creation.
Patch by Emily Morehouse.
2016-06-02 20:05:43 -04:00
Berker Peksag
2c57da0e48 Add a versionchanged directive to document addition of the new 'namereplace' error handler.
Reported by Robert on docs@p.o.
2016-04-11 13:49:46 +03:00