Checking if elements are empty

Neil Cerutti horpner at yahoo.com
Tue Sep 11 07:15:19 EDT 2007


On 2007-09-10, Steve Holden <steve at holdenweb.com> wrote:
>> I have a quibble not with the functionality of the boolean check,
>> but with its expressiveness. if y[0] == "" expresses more, i.e.,
>> that I expect y[0] to contain a Python byte string.
>
> I have a quibble with a test that will raise an exception when
> the anticipated condition is true. Your test is patently
> absurd, as you would have discovered had you bothered to try
> it:

"if y[0] == "" expresses more, i.e., that I expect y[0] to
contain a Python byte string."

-- 
Neil Cerutti
Bach's death is attributed to the end of the Baroque era. --Music Lit Essay



More information about the Python-list mailing list