Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 8: Fix indentation of two paragraphs in list #2041

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pep-0008.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1357,15 +1357,15 @@ Programming Recommendations
# Wrong:
if type(obj) is type(1):

When checking if an object is a string, keep in mind that it might
be a unicode string too! In Python 2, str and unicode have a
common base class, basestring, so you can do::
When checking if an object is a string, keep in mind that it might
be a unicode string too! In Python 2, str and unicode have a
common base class, basestring, so you can do::

if isinstance(obj, basestring):

Note that in Python 3, ``unicode`` and ``basestring`` no longer exist
(there is only ``str``) and a bytes object is no longer a kind of
string (it is a sequence of integers instead).
Note that in Python 3, ``unicode`` and ``basestring`` no longer exist
(there is only ``str``) and a bytes object is no longer a kind of
string (it is a sequence of integers instead).

- For sequences, (strings, lists, tuples), use the fact that empty
sequences are false::
Expand Down