Next: Atoms
Up: Expressions and conditions
Previous: Expressions and conditions
When a description of an arithmetic operator below uses the phrase
``the numeric arguments are converted to a common type'',
this both means that if either argument is not a number, a
TypeError exception is raised, and that otherwise
the following conversions are applied:
- first, if either argument is a floating point number,
the other is converted to floating point;
- else, if either argument is a long integer,
the other is converted to long integer;
- otherwise, both must be plain integers and no conversion
is necessary.