Details
Description
x = "" if x: print "currently x is true in boolean context though it is empty"
Should not this condition return false ?
We could use string.IsEmptyOrNull when a string is used in a boolean context.
What do you think guys?
x = "" if x: print "currently x is true in boolean context though it is empty"
Should not this condition return false ?
We could use string.IsEmptyOrNull when a string is used in a boolean context.
What do you think guys?
it makes sense to provide an extension implicit boolean conversion operator for string. the compiler looks for implicit conversions for conditional blocks.