I'm a little confused on this one.

I have a Vector class that I want to be able to multiply by either another vector or by a single float value. How would I implement this in my override of __mul__ within that class?

Do you check the variable type with a stack of "if isinstance" statements or something? What is the preferred Python way of doing this?

- Warren
(war...@wantonhubris.com)




_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to