I'm not suggesting it's not operating as advertised - I'm suggesting the 'advertising' is slightly sguiffy if you catch my drift. I guess it's just me that finds it slightly counter intuitive. Surely intuitively the expression is "and" and therefore should always return a boolean?

I'll shut up now. ;)

AJ


On 31 Jan 2009, at 12:27, Vlastimil Brom wrote:

2009/1/31 AJ Ostergaard <a...@cubbyhole.net>:
Hi Ralf,

Thanks for that but why:

'' and True
''

Surely that should be False?!?

Regards,
AJ


see the docs:
http://docs.python.org/reference/expressions.html#boolean-operations

"The expression x and y first evaluates x; if x is false, its value is
returned; otherwise, y is evaluated and the resulting value is
returned."

hth,
 vbr

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to