building release - assert-free python library

Ulrich Eckhardt eckhardt at
Tue Apr 7 12:58:31 CEST 2009

grbgooglefan wrote:
> How can I build a release and not the debug version of libpython.a?
> I have seen that there are assert, abort statements in lot many
> functions in Python code. I would like to avoid those when compiling
> the libpython.a library because when this libpython gets used for
> production purpose and it aborts, the application goes down without
> any means of graceful handling that error condition.

You are misunderstanding assertions. If an assertion fires, you always have
a programming error that can not be recovered from. So, your program will
go down anyway, the difference is a defined way from an assertion compared
to an undefined one that can mean random corruption sometime sooner or
later. That said, the only reason to go without assertions is to improve


Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

More information about the Python-list mailing list