[python3-ldap] python3-ldap 0.9.5.4 released
Will Yardley
python.org at veggiechinese.net
Tue Sep 23 20:12:18 CEST 2014
On Tue, Sep 23, 2014 at 07:33:52PM +0200, python3ldap wrote:
> Do you think that something is still missing?
I wonder if there's a terser or easier to read way of doing this:
from ldap3 import [...] SEARCH_SCOPE_WHOLE_SUBTREE
c.search('o=test','(objectClass=*)', SEARCH_SCOPE_WHOLE_SUBTREE, [...]
At the least, the long constant, while precise, takes up an awful lot of
real estate.
I'm not sure what the cleanest / most proper / most "pythonic" way would
be, but I would have thought just having a parameter specified like
'scope=subtree' or something (with a default that represents the most
common use-case) would be simpler and much easier to read, unless this
way of doing things is deprecated for some reason.
w
More information about the python3-ldap
mailing list