[C++-sig] operator problem

David Abrahams dave at boost-consulting.com
Thu Nov 14 19:41:04 CET 2002


gaoyakun <gaoyakun at sina.com> writes:

> I have exported my point3 class to python, with many overloaded
> operators. it works fine for me except the *= operator. it always tell
> me "can't multiply sequence with non int type". but if i use
> p1.__imul__(p2) instead of p1 *= p2, it successfully executed my
> code. what's wrong with me? 

Nothing. It's a Python 2.2.1 bug. Upgrade to Python 2.2.2 and it will
go away.


-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution





More information about the Cplusplus-sig mailing list