Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

Given that using asdl_seq currently means casting from void*, we could maybe 
have a set of macros like asdl_seq_GET that are type specialized (there aren't 
many of them) and in debug mode they can check that the ->kind attribute is 
consistent with the specific type that the macro represents. For instance 
asdl_seq_GET_EXPR will check that the ->kind attribute is consistent with a 
valid EXPR. It will not catch all problems but it will catch almost all the 
typical ones in simple sequences.

----------

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

Reply via email to