Martin v. Loewis wrote: >Todd Miller <jmiller@stsci.edu> <mailto:jmiller@stsci.edu> writes: > >>TypeError: can't multiply sequence to non-int >> > >It seems that this has been fixed in the CVS. > >Regards, >Martin > I updated to the head and I still get: > class test1(object): def __init__(self): pass def __imul__(self, other): print "no luck here!" Python 2.3a0 (#3, Mar 27 2002, 15:27:32) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> t = test1() >>> t *= 1 no luck here! >>> t *= 1. Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported operand type(s) for *=: 'NoneType' and 'float' The latter is still a problem for me because Numarray needs to implement both sequence and number protocols, and wants the number protocol to dominate *=. What I think I see happening in both cases is the sequence protocol executing. Sorry if this is an old issue... Todd -- Todd Miller jmiller@stsci.edu <mailto:jmiller@stsci.edu> STSCI / SSG (410) 338 4576
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