building release - assert-free python library

G

grbgooglefan

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.
How can we handle this?
Please help
 
U

Ulrich Eckhardt

grbgooglefan said:
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
performance.

Uli
 
A

Aahz

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.
How can we handle this?

Are you talking about Python source code or C source code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top