Why are numbers represented as objects in python?

Viewed 405

Every time I perform an arthetic operation in python, new number objects are created. Wouldn't it be more efficient for the interpreter to perform arithmetic operations with primitive data types rather than having the overhead of creating objects (even for numbers) for arithmetic operations? Thank you in advance

2 Answers
Related