Setting options via class attributes of LDAPObject
Michael Ströder
michael at stroeder.com
Thu Jul 25 18:27:29 CEST 2002
Michael Ströder wrote:
>
> I'd like to remove the possibility to set/get LDAP options via class
> attributes of ldap.LDAPObject instances since it's error-prone and
> kludgy code.
>
> LDAPObject.set_option() and LDAPObject.get_option() is the complete
> solution.
>
> Although it might break existing code if I remove
> LDAPObject.__setattr__() and LDAPObject.__getattr__(). Therefore I'd
> like to ask who is setting LDAP options via class attributes?
Hmm, I've checked in a much less complex implementation of
LDAPObject.__setattr__() and LDAPObject.__getattr__().
But I'd really like to remove getattr() and setattr() in
LDAPObject.c since it does not make sense to do this at the C
level. But if I remove getattr() and setattr() the set_option()
and get_option() method are also removed.
David, can you please enlighten me how the stuff in options.c
works? It seems somewhat overly complex to me.
Ciao, Michael.
More information about the python-ldap
mailing list