Serhiy Storchaka
138ccbb022
bpo-38738: Fix formatting of True and False. (GH-17083)
...
* "Return true/false" is replaced with "Return ``True``/``False``"
if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
2019-11-12 16:57:03 +02:00
Victor Stinner
e471e72977
bpo-37330: open() no longer accept 'U' in file mode (GH-16959)
...
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.
2019-10-28 15:40:08 +01:00
Raymond Hettinger
15ccc4fac0
bpo-38255: super() can search attributes as well as methods (GH-16368)
...
Improvement suggested by Géry Ogam.
2019-09-25 08:13:19 -07:00
Ammar Askar
87d6cd3604
bpo-38237: Make pow's arguments have more descriptive names and be keyword passable (GH-16302)
...
Edit: `math.pow` changes removed on Mark's request.
https://bugs.python.org/issue38237
Automerge-Triggered-By: @rhettinger
2019-09-20 21:28:49 -07:00
smokephil
7a0023e8d1
bpo-25810: Clarify eval() docs, it does not keywords (GH-15173)
2019-09-11 05:30:04 -05:00
Andre Delfino
05184515f9
Correct minor grammatical mistake in open docs (GH-15865)
2019-09-10 15:48:05 +01:00
Andre Delfino
c1d8c1cb8e
Note regarding + mode truncation applies to both text and binary mode ( #11314 )
...
* Improve doc on open's mode +
* Improve wording
* Address comment from Rémi
2019-09-10 14:04:22 +01:00
Raymond Hettinger
cd81f0500f
bpo-23674: Clarify ambiguities in super() docs ( #15564 )
2019-08-29 00:44:02 -07:00
Berker Peksag
805f8f9afe
bpo-19072: Make @classmethod support chained decorators (GH-8405)
2019-08-24 15:37:25 -07:00
Raymond Hettinger
610a4823cc
bpo-37646: Document that eval() cannot access nested scopes (GH-15117)
2019-08-06 17:56:22 -07:00
Steve Dower
44f91c388a
bpo-37390: Add audit event table to documentations (GH-14406)
...
Also updates some (unreleased) event names to be consistent with the others.
2019-06-27 10:47:59 -07:00
Steve Dower
60419a7e96
bpo-37363: Add audit events for a range of modules (GH-14301)
2019-06-24 08:42:54 -07:00
Pablo Galindo
c4c421d619
bpo-37134: Use PEP570 syntax for sum() (GH-13851)
2019-06-06 00:11:46 +01:00
Mark Dickinson
c52996785a
bpo-36027: Extend three-argument pow to negative second argument (GH-13266)
2019-06-02 10:24:06 +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
Anthony Shaw
059b9ea5ac
bpo-31968: Documentation -- add clarification on the globals dict for exec() (GH-13140)
2019-06-01 08:51:58 -07:00
Steve Dower
b82e17e626
bpo-36842: Implement PEP 578 (GH-12613)
...
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
2019-05-23 08:45:22 -07:00
Matthias Bussonnier
565b4f1ac7
bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148)
...
Co-Authored-By: Yury Selivanov <yury@magic.io>
2019-05-21 16:12:02 -04:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
1c5fa5af8a
bpo-32413: Add documentation that at the module level, locals(), globals() are the same dictionary (GH-5004)
...
https://bugs.python.org/issue32413
2019-04-02 10:58:50 -07:00
Andre Delfino
548cb6060a
bpo-34085: Improve wording on classmethod/staticmethod ( #8228 )
...
* bpo-34085: Improve wording on classmethod/staticmethod
* Address comments from Éric
* Address comments from Éric
2019-03-25 18:53:43 -04:00
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