Re: Python-list Digest, Vol 64, Issue 697

2009-01-31 Thread AJ Ostergaard
AJ Ostergaard wrote: 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&

Re: Empty string is False right?

2009-01-31 Thread AJ Ostergaard
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 : Hi Ralf, Thanks for that but why: '' and True '' Surely that should be False?!? Regards, AJ see the docs: http://docs.python.org

Re: Empty string is False right?

2009-01-31 Thread AJ Ostergaard
Hi Ralf, Thanks for that but why: >>> '' and True '' Surely that should be False?!? Regards, AJ On 31 Jan 2009, at 12:12, Ralf Schoenian wrote: AJ Ostergaard wrote: Hello, First post so bear with me if I'm being a numpty ... Is it me or is there someth

Empty string is False right?

2009-01-31 Thread AJ Ostergaard
Hello, First post so bear with me if I'm being a numpty ... Is it me or is there something slightly counter intuitive and thus not so pythonesque about this: >>> s = '' >>> if s: True ... else: False ... False >>> s and eval(s) '' >>> Regards, AJ -- http://mail.python.org/mailman/listinfo/