[Python-3000-checkins] r58238 - python/branches/py3k/Lib/lib-tk/turtle.py
georg.brandl
python-3000-checkins at python.org
Sun Sep 23 15:37:01 CEST 2007
Author: georg.brandl
Date: Sun Sep 23 15:37:00 2007
New Revision: 58238
Modified:
python/branches/py3k/Lib/lib-tk/turtle.py
Log:
Fix turtle module: None and int are not comparable, map returns an iterator.
Modified: python/branches/py3k/Lib/lib-tk/turtle.py
==============================================================================
--- python/branches/py3k/Lib/lib-tk/turtle.py (original)
+++ python/branches/py3k/Lib/lib-tk/turtle.py Sun Sep 23 15:37:00 2007
@@ -531,7 +531,7 @@
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 @@
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")
More information about the Python-3000-checkins
mailing list