>>>>> "Chris Mellon" <[EMAIL PROTECTED]> (CM) wrote:

>CM> On 9/10/07, Neil Cerutti <[EMAIL PROTECTED]> wrote:

>>> Agreed; but I prefer 'if y[0] == ""', absent more context and
>>> better names.

>CM> Probably should use u"" if you're going to take that route, as this
>CM> will fail spuriously if y[0] contains a unicode string that can't be
>CM> implicitly converted to ascii. Personally, I prefer the boolean check
>CM> and I'll let operations fail elsewhere if there's a type mismatch.

>>> x=u"€"
>>> x == ""
False
>>> 

-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to