Yeah, I thought about this, too.  The alternative here could be to just
make use of the search_defaults attribute directly instead of the setter
and clear methods, e.g.:

conn.search_defaults.update(...)
del conn.search_defaults['scope']
conn.search_defaults.clear()

But, I think the set/clear methods are fine.


On Sat, Sep 28, 2013 at 3:45 AM, Wil Cooley <notifications@github.com>wrote:

> In simpleldap/__init__.py:
>
> > @@ -155,6 +158,31 @@ def __init__(self, hostname, port=None, dn='', password='',
> >              self.connection.start_tls_s()
> >          self.connection.simple_bind_s(dn, password)
> >
> > +    def search_defaults(self, **kwargs):
>
> Sure; I avoided set_ because I am under the impression that set_this and
> get_that are considered un-Pythonic; this isn't really a simple setter
> though.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gdub/python-simpleldap/pull/2/files#r6643741>
> .
>