+ and * operators

Alex cut_me_out at hotmail.com
Sun May 7 14:53:27 EDT 2000


> Is there some way to refer to the + and * operators as functions?

Yeah, use the operator module

>>> import operator 
>>> operator.add (5, 2)
7
>>> operator.mul (5, 2)
10
>>> 

Alex.



More information about the Python-list mailing list