This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abe
Recipients abe, loewis
Date 2008-08-14.09:48:14
SpamBayes Score 4.6425024e-09
Marked as misclassified No
Message-id <>
We started using Python 2.5.2 recently and a few developers have 
complained that they do not get any assertions anymore so yes, we do 
use _ASSERT() and _ASSERTE(), but after a brief look it seems as if we 
mainly use assert(). The developer using _ASSERT() cannot remember why 
this was necessary and the tests I have made today shows that we could 
probably move to assert() everywhere.

A more interesting aspect is that we have recently moved the the more 
secure CRT routines (strcpy_s etc) and tests have shown issues with 
these if we turn off assertions:

 int prevCrtReportMode=_CrtSetReportMode(_CRT_ASSERT,0);
 char str[8];

With assertions turned on, I get an assertion dialog saying "Buffer is 
too small" which is what I expect and want. With assertions turned off 
(as in the example above), I get a dialog saying "Microsoft Visual 
Studio C Runtime Library has detected a fatal error in crt.exe.".

The stack is still useful and we can find the cause of the error so it 
is not a serious problem for us since we will continue to turn on 
assertions after Py_Initialize().

I have not yet seen any examples where the are erroneous assertions.

Anyway, you have made your point and I really do not want to take up 
anymore of your time. I respect your opinion and at least I have forced 
you to think about this. We have a workaround that works for us so I am 
OK with closing this issue.

Many thanks!
Date User Action Args
2008-08-14 09:48:18abesetrecipients: + abe, loewis
2008-08-14 09:48:18abesetmessageid: <>
2008-08-14 09:48:17abelinkissue3545 messages
2008-08-14 09:48:15abecreate