[New-bugs-announce] [issue39585] Delete a pending item in _warning.c
hai shi
report at bugs.python.org
Sat Feb 8 09:27:40 EST 2020
New submission from hai shi <shihai1991 at 126.com>:
a pend item could be removed (https://github.com/python/cpython/blob/master/Python/_warnings.c#L493).
two reasons:
1) every warning have `__name__` and it must not NULL(`The tp_name slot must be set;` from pep0253)
2) the `__name__` of Warning class(including children class) can not be removed.
```
>>> del UserWarning.__name__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't set attributes of built-in/extension type 'UserWarning'
```
----------
components: Interpreter Core
messages: 361630
nosy: shihai1991
priority: normal
severity: normal
status: open
title: Delete a pending item in _warning.c
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39585>
_______________________________________
More information about the New-bugs-announce
mailing list