April 3, 2002
3:55 p.m.
[me]
This is Python with the PEP:
falseValues = [{}, [], 0, None, False] for x in falseValues: if not x: print "%s is 'false'." % x
[Fredrik Lundh]
can you explain how your second example covers everything that's in the PEP?
It doesn't cover everything in the PEP. Here's how I think of the PEP: With this PEP, we get to have our cake and eat it too: 1. There is one obviously correct way to return a truth value. 2. Polymorphous perversity with respect to truth still works. What's everybody complaining about? Cheers, // mark