From: Alain S. <asp...@gm...> - 2007-01-28 01:06:47
|
This is a good point of view! Anyway I try my _LAST_ arguments. Python is a language made to help and facilitate the developer work : - the developer dont need to test the result of any function, python (or the library) raise an exception if something is wrong. - the developer dont need to worry about the memory allocation, the garbage collector do it for him. - the developer dont need to close a file, the system do it for him when the object is released - the developer don't need to worry for long living LDAP connection, ReconnectLDAPObject auto reconnect automatically for him :-) - python-ldap is also thread safe ..... Then why does the developer have to encapsulate any ldap statement into a try: except ldap.SERVER_DOWN,e: SimpleLDAPObject.unbind_s(self) whereas=09the library can do it for him Anyway we made a good job ! Tanks for your support. On 1/27/07, "Michael Str=F6der" <mi...@st...> wrote: > On 12:59:58 pm 2007-01-27 "Alain Spineux" <asp...@gm...> wrote: > > > > And what about the idea to put the > > > > try: > > except ldap.SERVER_DOWN,e: > > SimpleLDAPObject.unbind_s(self) > > > > in the function _ldap_call too ? > > This will correct also SimpleLDAPObject ? > > There is nothing wrong with SimpleLDAPObject. The application is supposed > to catch and handle ldap.SERVER_DOWN. Additionally SimpleLDAPObject and > ReconnectLDAPObject shall behave in the same way. And IMO they do now. > > Ciao, Michael. > > --=20 -- Alain Spineux aspineux gmail com May the sources be with you |