[Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python (original) (raw)
Tres Seaver tseaver at palladion.com
Sat Jun 15 15:47:06 CEST 2013
- Previous message: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python
- Next message: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/15/2013 09:15 AM, Donald Stufft wrote:
I never want to iterate, but I love slice syntax and indexing. Don't think you can have that w/o being able to loop over it can you? Maybe I'm just thinking slow since I just woke up.
You could if 'iter' raised an error ('NotIterable', maybe) which defeated the 'getitem'/'len'-based fallback.
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/
iEYEARECAAYFAlG8cFoACgkQ+gerLs4ltQ7KcgCfdFCEkp2gBeuUgn/KooY7F5HX Jm8An2bwq8QoplwJ1MqIbS76m+xdl/Mk =6hA9 -----END PGP SIGNATURE-----
- Previous message: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python
- Next message: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]