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
c8a730bf
Commit
c8a730bf
authored
Mar 25, 2010
by
Florent Xicluna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax cleanup `== None` -> `is None`
parent
ff33e2f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+1
-1
Lib/lib-tk/turtle.py
Lib/lib-tk/turtle.py
+5
-5
No files found.
Lib/idlelib/PyShell.py
View file @
c8a730bf
...
...
@@ -350,7 +350,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
rpcpid
=
None
def
spawn_subprocess
(
self
):
if
self
.
subprocess_arglist
==
None
:
if
self
.
subprocess_arglist
is
None
:
self
.
subprocess_arglist
=
self
.
build_subprocess_arglist
()
args
=
self
.
subprocess_arglist
self
.
rpcpid
=
os
.
spawnv
(
os
.
P_NOWAIT
,
sys
.
executable
,
args
)
...
...
Lib/lib-tk/turtle.py
View file @
c8a730bf
...
...
@@ -783,7 +783,7 @@ class TurtleScreenBase(object):
# needs amendment
if
not
isinstance
(
self
.
cv
,
ScrolledCanvas
):
return
self
.
canvwidth
,
self
.
canvheight
if
canvwidth
is
None
and
canvheight
is
None
and
bg
is
None
:
if
canvwidth
is
canvheight
is
bg
is
None
:
return
self
.
cv
.
canvwidth
,
self
.
cv
.
canvheight
if
canvwidth
is
not
None
:
self
.
canvwidth
=
canvwidth
...
...
@@ -999,7 +999,7 @@ class TurtleScreen(TurtleScreenBase):
>>> mode()
'logo'
"""
if
mode
==
None
:
if
mode
is
None
:
return
self
.
_mode
mode
=
mode
.
lower
()
if
mode
not
in
[
"standard"
,
"logo"
,
"world"
]:
...
...
@@ -1339,7 +1339,7 @@ class TurtleScreen(TurtleScreenBase):
### repeatedly pressing the up-arrow key,
### consequently drawing a hexagon
"""
if fun
==
None:
if fun
is
None:
if key in self._keys:
self._keys.remove(key)
elif key not in self._keys:
...
...
@@ -1460,7 +1460,7 @@ class TNavigator(object):
def _setmode(self, mode=None):
"""Set turtle-mode to 'standard', 'world' or 'logo'.
"""
if mode
==
None:
if mode
is
None:
return self._mode
if mode not in ["
standard
", "
logo
", "
world
"]:
return
...
...
@@ -2704,7 +2704,7 @@ class RawTurtle(TPen, TNavigator):
>>> turtle.shapesize(5, 5, 12)
>>> turtle.shapesize(outline=8)
"""
if
stretch_wid
is
None
and
stretch_len
is
None
and
outline
==
None
:
if
stretch_wid
is
stretch_len
is
outline
is
None
:
stretch_wid
,
stretch_len
=
self
.
_stretchfactor
return
stretch_wid
,
stretch_len
,
self
.
_outlinewidth
if
stretch_wid
is
not
None
:
...
...
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