Activity log for bug #457979

Date Who What changed Old value New value Message
2009-10-22 08:11:40 Matt Nordhoff bug added bug
2009-10-22 08:13:24 Matt Nordhoff description Lookie: if (size < 0) { PyErr_BadInternalCall(); return NULL; } if (size < 0 || size > 255) { /* Too big or too small */ PyErr_SetString(PyExc_ValueError, "StaticTuple(...)" " takes from 0 to 255 items"); return NULL; } Not only is this redundant, but PyErr_BadInternalCall() throws a TypeError, meaning two different exception classes are used. ISTM StaticTuple_New should throw a ValueError, since you do StaticTuple_New(length), and StaticTuple_new_constructor should throw a TypeError, since you do StaticTuple(foo, bar, baz). FYI, the Python version of StaticTuple throws a ValueError when it's either <0 or >255. IMO, that should be a TypeError, same as StaticTuple_new_constructor. Lookie:     if (size < 0) {         PyErr_BadInternalCall();         return NULL;     }     if (size < 0 || size > 255) {         /* Too big or too small */         PyErr_SetString(PyExc_ValueError, "StaticTuple(...)"             " takes from 0 to 255 items");         return NULL;     } Not only is this redundant, but PyErr_BadInternalCall() throws a TypeError, meaning two different exception classes are used. ISTM StaticTuple_New should throw a ValueError, since you do StaticTuple_New(length), and StaticTuple_new_constructor should throw a TypeError, since you do StaticTuple(foo, bar, baz) (currently it lets StaticTuple_New handle throw the error). FYI, the Python version of StaticTuple throws a ValueError when it's either <0 or >255. IMO, that should be a TypeError, same as StaticTuple_new_constructor.
2009-10-22 08:47:22 Matt Nordhoff branch linked lp:~mnordhoff/bzr/st-size-exceptions
2010-02-17 07:44:04 Martin Pool bzr: importance Undecided Wishlist
2010-02-17 07:44:04 Martin Pool bzr: status New In Progress
2010-02-26 08:21:20 Matt Nordhoff bzr: status In Progress Fix Released
2010-02-26 08:21:20 Matt Nordhoff bzr: assignee Matt Nordhoff (mnordhoff)