[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
Euler Taveira de Oliveira added the comment: I know that it is a good programming practice checking null pointers but sometimes programmers are lazy. ;) I still think that high level functions should check for null pointers. -- ___ Python tracker

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
Euler Taveira de Oliveira added the comment: It seems PyDict_DelItemString() and PyDict_SetItem() suffer from the same disease. :( Both use assert() to detect a null pointer but fail to prevent it. As I stated in the previous comment, maybe the right fix is to replace assert() with the 'if

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
New submission from Euler Taveira de Oliveira : PyDict_SetItemString() fails when the second argument (key) is null pointer. It occurs because PyString_FromString(key) call doesn't check for null pointer and if we're in a disabled assert environment the assert() is not caught and strl