[Python-Dev] Semantics of int(), index() (original) (raw)
Tres Seaver tseaver at palladion.com
Wed Apr 3 18:25:32 CEST 2013
- Previous message: [Python-Dev] Semantics of __int__(), __index__()
- Next message: [Python-Dev] Semantics of __int__(), __index__()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 04/03/2013 11:49 AM, Steven D'Aprano wrote:
-1 on forcing int, str, float etc. to return instances of the built-in types.
- -1 as well, for the reasons Steven lists.
The only quasi-legitimate reason I know of for checking 'type(x) is int' rather than 'isinstance(x, int)' is speed.
Tres. - --
Tres Seaver +1 540-429-0999 tseaver at palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iEYEARECAAYFAlFcV/wACgkQ+gerLs4ltQ6OBwCg0YMyUdiji82TwYQZTx85F9cJ wmMAoKBL13C+a4MN640jL5X+X+G9RP5b =8q3C -----END PGP SIGNATURE-----
- Previous message: [Python-Dev] Semantics of __int__(), __index__()
- Next message: [Python-Dev] Semantics of __int__(), __index__()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]