Issue 34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser (original) (raw)

Currently pyexpat.xmlparser has the tp_getattro and tp_setattro slot for handling some attributes. The proposed PR replaces it with tp_members and tp_getset.

Benefits: constant time access, names of these attributes are added to the result of help(), no need of the dir() method, better structured code.