summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-12-18 14:12:30 (GMT)
committerGitHub <noreply@github.com>2021-12-18 14:12:30 (GMT)
commitbb286d45afa6740384bab97d0da68fe571efb6ec (patch)
tree9cadb0da34a8109768986f26c3371338f12546de /Doc/library
parent4f945ad7a510ad6dde13353784e45239edcdc14e (diff)
downloadcpython-bb286d45afa6740384bab97d0da68fe571efb6ec.zip
cpython-bb286d45afa6740384bab97d0da68fe571efb6ec.tar.gz
cpython-bb286d45afa6740384bab97d0da68fe571efb6ec.tar.bz2
bpo-46113: Minor fixes in stdtypes documentation (GH-30167) (GH-30186)
* Fix-1 - isidentifier() function output * Fix-2 Update the str.splitlines() function parameter * Fix-3 Removed unwanted full stop for str and bytes types double quotes examples. * Fix-4 Updated class dict from **kwarg to **kwargs (cherry picked from commit 6f2df4295123f8b961d49474b7668f7564a534a4) Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index e732bd8..101bbca 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1425,7 +1425,7 @@ Strings are immutable
written in a variety of ways:
* Single quotes: ``'allows embedded "double" quotes'``
-* Double quotes: ``"allows embedded 'single' quotes"``.
+* Double quotes: ``"allows embedded 'single' quotes"``
* Triple quoted: ``'''Three single quotes'''``, ``"""Three double quotes"""``
Triple quoted strings may span multiple lines - all associated whitespace will
@@ -1751,9 +1751,9 @@ expression support in the :mod:`re` module).
>>> from keyword import iskeyword
>>> 'hello'.isidentifier(), iskeyword('hello')
- True, False
+ (True, False)
>>> 'def'.isidentifier(), iskeyword('def')
- True, True
+ (True, True)
.. method:: str.islower()
@@ -2020,7 +2020,7 @@ expression support in the :mod:`re` module).
.. index::
single: universal newlines; str.splitlines method
-.. method:: str.splitlines([keepends])
+.. method:: str.splitlines(keepends=False)
Return a list of the lines in the string, breaking at line boundaries. Line
breaks are not included in the resulting list unless *keepends* is given and
@@ -2433,7 +2433,7 @@ data and are closely related to string objects in a variety of other ways.
literals, except that a ``b`` prefix is added:
* Single quotes: ``b'still allows embedded "double" quotes'``
- * Double quotes: ``b"still allows embedded 'single' quotes"``.
+ * Double quotes: ``b"still allows embedded 'single' quotes"``
* Triple quoted: ``b'''3 single quotes'''``, ``b"""3 double quotes"""``
Only ASCII characters are permitted in bytes literals (regardless of the
@@ -4334,9 +4334,9 @@ Dictionaries can be created by placing a comma-separated list of ``key: value``
pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
'jack', 4127: 'sjoerd'}``, or by the :class:`dict` constructor.
-.. class:: dict(**kwarg)
- dict(mapping, **kwarg)
- dict(iterable, **kwarg)
+.. class:: dict(**kwargs)
+ dict(mapping, **kwargs)
+ dict(iterable, **kwargs)
Return a new dictionary initialized from an optional positional argument
and a possibly empty set of keyword arguments.