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
f1368ef9
Commit
f1368ef9
authored
Sep 23, 2007
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix turtle module: None and int are not comparable, map returns an iterator.
parent
8ae62b60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/lib-tk/turtle.py
Lib/lib-tk/turtle.py
+5
-5
No files found.
Lib/lib-tk/turtle.py
View file @
f1368ef9
...
...
@@ -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"
)
...
...
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