[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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4