[Python-Dev] [Python-checkins] cpython: Issue #11393: get more information on assertion error (test_faulthandler)

Victor Stinner victor.stinner at haypocalc.com
Thu Mar 31 20:26:34 CEST 2011


> > http://hg.python.org/cpython/rev/61626c3f3a54
> >...
> > -    assert (b -a)>= pause
> > +    assert (b - a)>= pause, "{{}}<  {{}}".format(b - a, pause)
> 
> > +        assert (b - a)>= pause, "{{}}<  {{}}".format(b - a, pause)
> 
>  >>> a,b,pause = 0,0,1
>  >>> "{{}} < {{}}".format(b - a, pause)
> '{} < {}'
> 
> I suspect you want 1 or 3 braces.
> 
> Terry

Nope, I really want {{}}: the diff is on a template using to generate
Python code executed in a subprocess.

Victor



More information about the Python-Dev mailing list