Commit c8a730bf authored by Florent Xicluna's avatar Florent Xicluna

Syntax cleanup `== None` -> `is None`

parent ff33e2f5
...@@ -350,7 +350,7 @@ class ModifiedInterpreter(InteractiveInterpreter): ...@@ -350,7 +350,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
rpcpid = None rpcpid = None
def spawn_subprocess(self): def spawn_subprocess(self):
if self.subprocess_arglist == None: if self.subprocess_arglist is None:
self.subprocess_arglist = self.build_subprocess_arglist() self.subprocess_arglist = self.build_subprocess_arglist()
args = self.subprocess_arglist args = self.subprocess_arglist
self.rpcpid = os.spawnv(os.P_NOWAIT, sys.executable, args) self.rpcpid = os.spawnv(os.P_NOWAIT, sys.executable, args)
......
...@@ -783,7 +783,7 @@ class TurtleScreenBase(object): ...@@ -783,7 +783,7 @@ class TurtleScreenBase(object):
# needs amendment # needs amendment
if not isinstance(self.cv, ScrolledCanvas): if not isinstance(self.cv, ScrolledCanvas):
return self.canvwidth, self.canvheight 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 return self.cv.canvwidth, self.cv.canvheight
if canvwidth is not None: if canvwidth is not None:
self.canvwidth = canvwidth self.canvwidth = canvwidth
...@@ -999,7 +999,7 @@ class TurtleScreen(TurtleScreenBase): ...@@ -999,7 +999,7 @@ class TurtleScreen(TurtleScreenBase):
>>> mode() >>> mode()
'logo' 'logo'
""" """
if mode == None: if mode is None:
return self._mode return self._mode
mode = mode.lower() mode = mode.lower()
if mode not in ["standard", "logo", "world"]: if mode not in ["standard", "logo", "world"]:
...@@ -1339,7 +1339,7 @@ class TurtleScreen(TurtleScreenBase): ...@@ -1339,7 +1339,7 @@ class TurtleScreen(TurtleScreenBase):
### repeatedly pressing the up-arrow key, ### repeatedly pressing the up-arrow key,
### consequently drawing a hexagon ### consequently drawing a hexagon
""" """
if fun == None: if fun is None:
if key in self._keys: if key in self._keys:
self._keys.remove(key) self._keys.remove(key)
elif key not in self._keys: elif key not in self._keys:
...@@ -1460,7 +1460,7 @@ class TNavigator(object): ...@@ -1460,7 +1460,7 @@ class TNavigator(object):
def _setmode(self, mode=None): def _setmode(self, mode=None):
"""Set turtle-mode to 'standard', 'world' or 'logo'. """Set turtle-mode to 'standard', 'world' or 'logo'.
""" """
if mode == None: if mode is None:
return self._mode return self._mode
if mode not in ["standard", "logo", "world"]: if mode not in ["standard", "logo", "world"]:
return return
...@@ -2704,7 +2704,7 @@ class RawTurtle(TPen, TNavigator): ...@@ -2704,7 +2704,7 @@ class RawTurtle(TPen, TNavigator):
>>> turtle.shapesize(5, 5, 12) >>> turtle.shapesize(5, 5, 12)
>>> turtle.shapesize(outline=8) >>> 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 stretch_wid, stretch_len = self._stretchfactor
return stretch_wid, stretch_len, self._outlinewidth return stretch_wid, stretch_len, self._outlinewidth
if stretch_wid is not None: if stretch_wid is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment