diff options
author | Georg Brandl <georg@python.org> | 2007-09-23 13:37:00 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-23 13:37:00 (GMT) |
commit | f1368ef904e5dcd38a15f623e12ec9ac2d5a54ab (patch) | |
tree | 9b8a580ba9785928dab938ea6594403b61e80192 /Lib/lib-tk | |
parent | 8ae62b60940ae0f33b1792703f3255e9c6a6a88a (diff) | |
download | cpython-f1368ef904e5dcd38a15f623e12ec9ac2d5a54ab.zip cpython-f1368ef904e5dcd38a15f623e12ec9ac2d5a54ab.tar.gz cpython-f1368ef904e5dcd38a15f623e12ec9ac2d5a54ab.tar.bz2 |
Fix turtle module: None and int are not comparable, map returns an iterator.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/turtle.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py index 434579e..7cf298d 100644 --- a/Lib/lib-tk/turtle.py +++ b/Lib/lib-tk/turtle.py @@ -531,7 +531,7 @@ class RawPen: def _goto(self, x1, y1): x0, y0 = self._position - self._position = map(float, (x1, y1)) + self._position = (float(x1), float(y1)) if self._filling: self._path.append(self._position) if self._drawing: @@ -749,25 +749,25 @@ def setup(**geometry): global _width, _height, _startx, _starty width = geometry.get('width',_width) - if width >= 0 or width == None: + if width is None or width >= 0: _width = width else: raise ValueError("width can not be less than 0") height = geometry.get('height',_height) - if height >= 0 or height == None: + if height is None or height >= 0: _height = height else: raise ValueError("height can not be less than 0") startx = geometry.get('startx', _startx) - if startx >= 0 or startx == None: + if startx is None or startx >= 0: _startx = _startx else: raise ValueError("startx can not be less than 0") starty = geometry.get('starty', _starty) - if starty >= 0 or starty == None: + if starty is None or starty >= 0: _starty = starty else: raise ValueError("startx can not be less than 0") |