[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-07-25 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage:  - resolved
status: open - closed
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-07-22 Thread Lita Cho

Lita Cho added the comment:

This is now fixed due to a patch in issue21868.

--
resolution:  - fixed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-06-25 Thread Lita Cho

Changes by Lita Cho lita@gmail.com:


--
nosy: +jesstess

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-06-25 Thread Lita Cho

New submission from Lita Cho:

Turtle currently has a bug where it will return a TypeError when undobuffer is 
set to less than or equal to 0 (aka undo is not allowed).

turtle.setundobuffer(0)
turtle.undo()


If an exception must be thrown, it should be a Turtle exception and not a 
TypeError. However, I also feel like if the user calls undo, nothing should 
happen when undobuffer is set to 0.

--
messages: 221529
nosy: Lita.Cho
priority: normal
severity: normal
status: open
title: Turtle returns TypeError when undobuffer is set to 0 (aka no undo is 
allowed)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-06-25 Thread Lita Cho

Lita Cho added the comment:

The patch in issue21868 will fix this issue if it gets approved.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-06-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

For the most part, we don't change exceptions once they are published in the 
standard library because it breaks any code that relies on those exceptions.  
That is why it is so important to get the API correct to begin with.

TypeError was the wrong choice, it should has been a ValueError (the type is 
correct but the value doesn't make sense).   There is some case for a 
TurtleError (modules like decimal and sqlite3 define their own clusters of 
exceptions); however, that makes the exception less interoperable with the rest 
of Python where things like IndexError, StopIteration, ValueError, and KeyError 
get caught and handled appropriately.

--
assignee:  - rhettinger
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21867] Turtle returns TypeError when undobuffer is set to 0 (aka no undo is allowed)

2014-06-25 Thread Lita Cho

Lita Cho added the comment:

That makes a lot of sense. Does that mea we shouldn't change this behaviour as 
there might be code that relies on these exceptions? The fix in issue21868 will 
make it so that undo doesn't cause turtle to crash.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21867
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com