setattr vs readonly property
james_027
cai.haibin at gmail.com
Wed Sep 12 05:07:39 EDT 2007
hi,
My main purpose for using setattr(object, attr, value) for assign
values from a dict that has some keys that may not be present on some
object's attibute, which makes it work for me. My problem is dealing
with read only attribute like sample_attribute =
property(f_get=_get_sample_attribute). what approach should I use? Or
is my first approach In the first place right?
Thanks
james
More information about the Python-list
mailing list