[Python-Dev] cpython: Issue #12469: replace assertions by explicit if+raise

Georg Brandl g.brandl at gmx.net
Mon Jul 4 19:37:47 CEST 2011


Am 04.07.2011 18:23, schrieb Antoine Pitrou:
> On Mon, 04 Jul 2011 18:06:53 +0200
> victor.stinner <python-checkins at python.org> wrote:
>> http://hg.python.org/cpython/rev/7eef821ab20d
>> changeset:   71197:7eef821ab20d
>> user:        Victor Stinner <victor.stinner at haypocalc.com>
>> date:        Mon Jul 04 18:06:35 2011 +0200
>> summary:
>>   Issue #12469: replace assertions by explicit if+raise
> 
> Instead of generic Exception, it would be better to use AssertionError.

What is the reason for this change anyway -- as far as I can see this code
is never run with -O.

Also I don't see how it relates to #12469.

Georg



More information about the Python-Dev mailing list