Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
094662a1
Commit
094662a1
authored
Jun 01, 2002
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace boolean test with is None
parent
0f4940c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
Lib/formatter.py
Lib/formatter.py
+2
-2
Lib/ftplib.py
Lib/ftplib.py
+1
-1
Lib/gettext.py
Lib/gettext.py
+1
-1
Lib/hmac.py
Lib/hmac.py
+1
-1
No files found.
Lib/formatter.py
View file @
094662a1
...
...
@@ -38,7 +38,7 @@ class NullFormatter:
"""
def
__init__
(
self
,
writer
=
None
):
if
not
writer
:
if
writer
is
None
:
writer
=
NullWriter
()
self
.
writer
=
writer
def
end_paragraph
(
self
,
blankline
):
pass
...
...
@@ -433,7 +433,7 @@ class DumbWriter(NullWriter):
def
test
(
file
=
None
):
w
=
DumbWriter
()
f
=
AbstractFormatter
(
w
)
if
file
:
if
file
is
not
None
:
fp
=
open
(
file
)
elif
sys
.
argv
[
1
:]:
fp
=
open
(
sys
.
argv
[
1
])
...
...
Lib/ftplib.py
View file @
094662a1
...
...
@@ -659,7 +659,7 @@ class Netrc:
__defacct = None
def __init__(self, filename=None):
if
not filenam
e:
if
filename is Non
e:
if os.environ.has_key("HOME"):
filename = os.path.join(os.environ["HOME"],
".netrc")
...
...
Lib/gettext.py
View file @
094662a1
...
...
@@ -104,7 +104,7 @@ class NullTranslations:
self
.
_info
=
{}
self
.
_charset
=
None
self
.
_fallback
=
None
if
fp
:
if
fp
is
not
None
:
self
.
_parse
(
fp
)
def
_parse
(
self
,
fp
):
...
...
Lib/hmac.py
View file @
094662a1
...
...
@@ -46,7 +46,7 @@ class HMAC:
key
=
key
+
chr
(
0
)
*
(
blocksize
-
len
(
key
))
self
.
outer
.
update
(
_strxor
(
key
,
opad
))
self
.
inner
.
update
(
_strxor
(
key
,
ipad
))
if
(
msg
)
:
if
msg
is
not
None
:
self
.
update
(
msg
)
## def clear(self):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment