Ronald Oussoren <ronaldousso...@mac.com> added the comment:

It's not as easy as that, the SystemError in the original report is caused by 
invalid use of a C-API due to partial initialisation of an _struct.Struct 
instance.

The solution is likely two-fold:

1) Ensure that __new__ fully initialises the fields in de C struct to some value

2) (Possibly) check that fields in the C structure have a sane value before 
using them. This part can have a measurable performance cost, and it would be 
nicer to avoid this by picking smart values in (1). 

The most important bit is the first step, even if that keeps raising 
SystemError when only calling Struct.__new__ because this avoid crashing the 
interpreter.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34543>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to