What way is the best to check an empty list?

Albert Hopkins marduk at letterboxes.org
Wed Mar 25 19:04:30 EDT 2009


On Wed, 2009-03-25 at 21:26 +0000, Martin P. Hellwig wrote:
> > 
> > PEP 8 recommends the latter.
> > 
> > 
> > Raymond
> I can't seem to find where this recommendation is mentioned or implied.

Wow, you must not have looked very hard:

     1. Point your browser to http://www.python.org/dev/peps/pep-0008/
     2. Go to Edit->Find
     3. Type "empty"
     4. It's the very first (in fact only) match

-a





More information about the Python-list mailing list