String Exceptions (PEP 352)
bruno at modulix
onurb at xiludom.gro
Fri May 5 08:31:07 EDT 2006
Paul Rubin wrote:
> bruno at modulix <onurb at xiludom.gro> writes:
>
>>What's wrong with:
>>
>>assert foo and bar and i > 10, \
>> "if foo and bar i must not be greater than 10"
>
>
> It doesn't necessarily do anything. With optimization enable, assert
> is a no-op.
quoting the OP (emphasis is mine):
"""
I use string exceptions if the condition for an *assertion* is
to complex:
"""
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list