[Python-Dev] PyObject_SetAttr/GetAttr() and non-string attribute names

M.-A. Lemburg mal@lemburg.com
Fri, 08 Sep 2000 23:48:18 +0200

While hacking along on a patch to let set|get|hasattr() accept
Unicode attribute names, I found that all current tp_getattro
and tp_setattro implementations (classes, instances, methods) expect
to find string objects as argument and don't even check for this.

Is this documented somewhere ? Should we make the existing
implementations aware of other objects as well ? Should we
fix the de-facto definition to string attribute names ?

My current solution does the latter. It's available as patch
on SF.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/