On Mon, 2007-10-22 at 15:05 +0200, Michael Ströder wrote:
> 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)

Sure, I was just copying has_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.

I'm happy with the setup I've got now, but if I ever need to deal with
attribute OIDs then I'll look into it.

James Andrewartha

-------------------------------------------------------------------------
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
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to