James Andrewartha wrote:
>
> --- cidict.py~ 2003-08-25 00:28:12.000000000 +0800
> +++ cidict.py 2007-10-22 20:16:54.000000000 +0800
> @@ -43,6 +43,9 @@
> def has_key(self,key):
> return UserDict.has_key(self,lower(key))
>
> + def __contains__(self,key):
> + return UserDict.has_key(self,lower(key))
> +
> def get(self,key,failobj=None):
> try:
> return self[key]
I'd prefer if it's ok for you:
def __contains__(self,key):
return self.has_key(self,key)
If you're using ldap.schema you might want to look into using class
ldap.schema.models.Entry instead of simply ldap.cidict.cidict because
you don't have to care about attribute description aliases and mapping
them to OIDs.
Ciao, Michael.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev