-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Zvezdan Petkovic wrote:
Is this a typo?
Yes, thanks for the catch.
On Oct 27, 2008, at 1:57 PM, Tres Seaver wrote:
def f13(): - assert any([True, True, True]) == True - assert any([True, False, True]) == True - assert any([False, False, False]) == False + try: + all
I thinks this should be "any" instead of "all".
+ except NameError: + pass # Python < 2.5 + else: + assert any([True, True, True]) == True + assert any([True, False, True]) == True + assert any([False, False, False]) == False f13()
Arguably, if there's an "all", there will be "any", so it will work the same, but looks a little strange to try for "all" and then use "any" in assertion.
Best regards,
Zvezdan
- -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJBh4o+gerLs4ltQ4RAtGGAJ45034n4Wyzc0ZjTHC2WMlA8p8auwCfWKhw BN0IJVXPJKAoJmPgj8Q4/Vw= =08ye -----END PGP SIGNATURE-----