Inada Naoki <songofaca...@gmail.com> added the comment:

> I am not "touching" tp_print. I am simply defining it as 0 to avoid the 
> missing initialiser warning.

I meant it.  `tp_print = 0` touches the deprecated `tp_print` field.
It is not forward compatible.  Note that we need to re-add tp_print only for C 
code which does `tp_print = 0`.


>  My point is that it should be possible to write code that doesn't trigger 
> warnings (whether or not you suppress them).

There is a simple solution: don't use `-Wextra`.

We have some reserved/deprecated/unused fields.  Setting 0 to them makes 
forward incompatible code.  It bothers us to remove or reuse these fields.

There are some other solutions, suppress the missing initializer warning as I 
wrote above, or use PyType_FromSpec instead of static type.

----------

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

Reply via email to