You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate deleting with PyObject_SetAttr, PyObject_SetAttrString and PySequence_SetItem #69959
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2015-12-18.16:54:41.854>created_at=<Date2015-12-01.15:44:28.237>labels= ['interpreter-core', 'type-feature']
title='Deprecate deleting with PyObject_SetAttr, PyObject_SetAttrString and PySequence_SetItem'updated_at=<Date2015-12-18.16:54:41.853>user='https://github.com/serhiy-storchaka'
If the third argument of PyObject_SetAttr(), PyObject_SetAttrString() or PySequence_SetItem() is NULL, these functions delete an attribute or an item. This is rather undocumented implementation detail. There are special counterparts for deleting: PyObject_DelAttr(), PyObject_DelAttrString() and PySequence_DelItem(). May be worth to depre
Proposed patch deprecates using these Set* functions for deleting and replaces them with appropriate Del* functions if needed.
Activity
serhiy-storchaka commentedon Dec 1, 2015
If the third argument of PyObject_SetAttr(), PyObject_SetAttrString() or PySequence_SetItem() is NULL, these functions delete an attribute or an item. This is rather undocumented implementation detail. There are special counterparts for deleting: PyObject_DelAttr(), PyObject_DelAttrString() and PySequence_DelItem(). May be worth to depre
Proposed patch deprecates using these Set* functions for deleting and replaces them with appropriate Del* functions if needed.
Discussion on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/155474
Issue that documents deleting with Set* APIs: bpo-25701.
serhiy-storchaka commentedon Dec 18, 2015
The conclusion of the discussion is to not deprecate this behavior in the code, but just warn in the documentation. That has done in bpo-25701.