diff options
author | Stanley <46876382+slateny@users.noreply.github.com> | 2022-12-09 03:31:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 03:31:19 (GMT) |
commit | 286e3c76a9cb8f1adc2a915f0d246a1e2e408733 (patch) | |
tree | 2cf574ca38a0f8222784cb691666548e8d0b686a /Doc/whatsnew | |
parent | 3e06b5030b18ca9d9d507423b582d13f38d393f2 (diff) | |
download | cpython-286e3c76a9cb8f1adc2a915f0d246a1e2e408733.zip cpython-286e3c76a9cb8f1adc2a915f0d246a1e2e408733.tar.gz cpython-286e3c76a9cb8f1adc2a915f0d246a1e2e408733.tar.bz2 |
gh-99087: Add missing newline for prompts in docs (GH-98993)
Add newline for prompts so copying to REPL does not cause errors.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.7.rst | 1 | ||||
-rw-r--r-- | Doc/whatsnew/3.2.rst | 3 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index 276ab63..810a2cd 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -1331,6 +1331,7 @@ changes, or look through the Subversion logs for all the details. >>> from inspect import getcallargs >>> def f(a, b=1, *pos, **named): ... pass + ... >>> getcallargs(f, 1, 2, 3) {'a': 1, 'b': 2, 'pos': (3,), 'named': {}} >>> getcallargs(f, a=2, x=4) diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 6037db9..1b1455b 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -468,6 +468,7 @@ Some smaller changes made to the core Python language are: >>> class LowerCasedDict(dict): ... def __getitem__(self, key): ... return dict.__getitem__(self, key.lower()) + ... >>> lcd = LowerCasedDict(part='widgets', quantity=10) >>> 'There are {QUANTITY} {Part} in stock'.format_map(lcd) 'There are 10 widgets in stock' @@ -475,6 +476,7 @@ Some smaller changes made to the core Python language are: >>> class PlaceholderDict(dict): ... def __missing__(self, key): ... return '<{}>'.format(key) + ... >>> 'Hello {name}, welcome to {location}'.format_map(PlaceholderDict()) 'Hello <name>, welcome to <location>' @@ -1886,6 +1888,7 @@ inspect >>> from inspect import getgeneratorstate >>> def gen(): ... yield 'demo' + ... >>> g = gen() >>> getgeneratorstate(g) 'GEN_CREATED' diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 96a6325..9e8d424 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -560,6 +560,7 @@ Example with (non-bound) methods:: >>> class C: ... def meth(self): ... pass + ... >>> C.meth.__name__ 'meth' >>> C.meth.__qualname__ |