No, it wouldn't.
It silently converts some values to -1. This is only useful if you want to check if the number is representable by an IV.
It silently converts some positive values to negative values. This is only useful if you want to cast from unsigned to signed.
In both cases, it would be better if you used an approach that made it clear what you wanted to do instead.
In reply to Re^2: Weird behavior of int()
by ikegami
in thread Weird behavior of int()
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |