(from comp.lang.python) can this be fixed? should this be fixed? (please?) </F> ----- Original Message ----- From: "Pearu Peterson" <pearu@cens.ioc.ee> Newsgroups: comp.lang.python Sent: Tuesday, February 06, 2001 2:42 PM Subject: list.index(..) -> TypeError bug or feature? > > In Python 2.1a2 I get TypeError exception from list index() method even if > the list contains given object: > > >>> from gmpy import mpz > >>> a = [mpz(1),[]] > >>> a.index([]) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > TypeError: coercion to gmpy.mpz type failed > > while in Python 2.0b2 it works: > > >>> a = [mpz(1),[]] > >>> a.index([]) > 1 > > Is this Python 2.1a2 bug or gmpy bug? Or my bug and Python 2.1 feature? > > Thanks, > 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