A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/012700.html below:

list.index(..) -> TypeError bug or feature?

[Python-Dev] Fw: list.index(..) -> TypeError bug or feature?Pearu Peterson Pearu Peterson <pearu@cens.ioc.ee>
Tue, 6 Feb 2001 20:52:38 +0200 (EET)
On Tue, 6 Feb 2001, M.-A. Lemburg wrote:

> Fredrik Lundh wrote:
> > 
> > (from comp.lang.python)
> > 
> > can this be fixed?  should this be fixed?  (please?)
> 
> Depends on whether gmpy (what is this, BTW) uses the old coercion
> mechanism correctly or not which is hard to say from here ;)

About gmpy, see
http://gmpy.sourceforge.net/

> Also, was gmpy recompiled for 2.1a2 and which part raised the
> exception (Python or gmpy) ?

gmpy was recompiled for 2.1a2, though the same gmpy worked fine with
2.0b2. The exception was raised in gmpy part.

> In any case, I'd say that .index() should not raise TypeErrors
> in case coercion fails.

I fixed this in gmpy source --- there the Pymp*_coerce functions raised an
exception instead of returning `1' when coerce failed.
So, this was gmpy bug, Python 2.1a2 just revealed it.

Regards,
	Pearu




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4