[python3-ldap] Feedback on aspects of python3-ldap's API

Florian Friesdorf flo at chaoflow.net
Mon Sep 22 19:15:45 CEST 2014


Hi Giovanni,

On community.plone.org[1] you are asking what we consider confusing
about python3-ldap's API. I hope it is in your interest that I post this
feedback here to the python3-ldap list. To the other aspects of your
posting I will reply on community.plone.org

[1] https://community.plone.org/t/ldap-status-quo-and-where-to-go-from-here/285

On Sun, Sep 21 2014, cannata_g wrote:
> Hello everybody,
> I'm the author of python3-ldap. I read in your message that you think
> that the python3-ldap API is "confusing". I'd like to know what you
> mean by that, are you referring to the documentation (still not
> completed) or to the API itself?.

The opinion that python3-ldap's API is confusing to us, was formed after
a brief look at the quick tour[2]:

[2] http://pythonhosted.org/python3-ldap/quicktour.html

To perform a search, python3-ldap uses a connection object on which a
search method is called with the search parameters. The result is not
returned but instead there are .result and .response attributes on the
connection.

When using a connection as context-manager, the connection lives on
after leaving the context. Within the context the binding to the ldap
server is magically changed.

Both these things we consider rather untypical for pythonic APIs.

regards
Marko and Florian
-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python3-ldap/attachments/20140922/a1112a92/attachment.sig>


More information about the python3-ldap mailing list