|
From: David L. <dav...@it...> - 2001-11-13 03:01:17
|
On Tue, 13 Nov 2001, Michael Str=F6der typed thusly: > Jacek Konieczny wrote: > > > > I will also make ldap.get_option() function and get_option/set_option > > methods of LDAPObject. > > Shouldn't the LDAPObject-related options be implemented by > __getattr__() and __setattr__()? I have no personal preference but > this is how it's done today (e.g. "version" etc.) and it's very > Pythonic. you mean, like this? =09print ldap.option.api_info =09ldap.option.debug_level =3D 2 i think it is just as easy doing it the current get_option() way, and means that OpenLDAP's documentation/manuals remains sensible for people who want to read up on what the options mean. The only real plus I can think of with attributes is that you have the advantage of hasattr() and as you say, it is more pythonic. d --=20 David Leonard Dav...@it... Dept of Inf. Tech. and Elec. Engg _ Ph:+61 404 844 850 The University of Queensland |+| http://www.itee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ B73CD65FBEF4C089B79A8EBADF1A932F13E= A0FC8 |