On Sun, Nov 05, 2017 at 11:28:44AM +1100, Steve D'Aprano wrote: > > Try in an interactive interpreter: > > > > python> "a string" is True > > Did you try that yourself?
Yes, eventually, which is why I corrected myself publicly. However, while it doesn't return True (as I mistakenly suggested) it does return False, always, which is the very same reason for OP's problem, namely returning a string, doing a logic test on that, and assuming that would tell whether the check succeeded or failed. Unless I am totally mistaken :-) Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list