Karen Tracey wrote:
> There is already a bug for this, I believe:
>
> http://bugs.python.org/issue1242657
Thanks.
Raymond, based on your other message, I kicked that issue in your direction.
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
-
If you want this changed, I can use a negative return
value for other than an attribute error, and modify
the calling code to handle the exception.
To me this isn't worth making the code slower and
more complex. But I can also see wanting to catch
a SystemError at any possible step.
It has the
On Wed, Jan 14, 2009 at 10:11 AM, Raymond Hettinger wrote:
> _PyObject_LengthHint() is specified to never fail.
> If any exception occurs along the way, it returns a
> default value. In the context of checking for length
> hints from an iterator, this seems reasonable to me.
>
> If you want this
_PyObject_LengthHint() is specified to never fail.
If any exception occurs along the way, it returns a
default value. In the context of checking for length
hints from an iterator, this seems reasonable to me.
If you want this changed, I can use a negative return
value for other than an attribute
On Wed, Jan 14, 2009 at 6:12 AM, Nick Coghlan wrote:
> Dino Viehland wrote:
> > We had a bug reported that effectively boils down to we're not
> > swallowing exceptions when list calls __len__
> > (
> http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=20598
> ).
> >
> >
Dino Viehland wrote:
> We had a bug reported that effectively boils down to we’re not
> swallowing exceptions when list calls __len__
> (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=20598).
>
>
> We can obviously make the change to catch exceptions here in
> IronPy
There seems to be an unconditional PyErr_Clear() in
_PyObject_LengthHint(). I think that could and should be much more
careful; it probably should only ignore AttributeErrors (though there
may be unittests to the contrary).
On Tue, Jan 13, 2009 at 8:24 PM, Dino Viehland wrote:
> We had a bug repo
We had a bug reported that effectively boils down to we’re not swallowing
exceptions when list calls __len__
(http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=20598).
We can obviously make the change to catch exceptions here in IronPython even if
it seems like a bad