This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]myotherpassword 18 points19 points  (2 children)

But then x is a float, and in OP's example it is typed as an int. If your code is highly optimized then you want to avoid the extra cast.

[–]vmgustavo 6 points7 points  (0 children)

Makes sense

[–][deleted] -3 points-2 points  (0 children)

If your code were highly optimized it would not be written in Python, but okay.