small fix for cidict.get()

Lars Damerow lars at pixar.com
Thu Aug 21 22:18:28 CEST 2003


Hello!

Attached is a patch that makes cidict.get() act more like the regular
dictionary get method. failobj shouldn't always need to be specified by the
caller.

cheers,
lars

___________________________________________________________
lars damerow
button pusher
pixar animation studios
lars at pixar.com

"I'll have my lunch now; a single pillow of shredded wheat, some steamed toast,
and a dodo egg."
                                                    Montgomery Burns
-------------- next part --------------
--- python-ldap-2.0.0pre06/Lib/ldap/cidict.py.org	2003-08-21 13:10:41.000000000 -0700
+++ python-ldap-2.0.0pre06/Lib/ldap/cidict.py	2003-08-21 13:11:03.000000000 -0700
@@ -41,7 +41,7 @@
   def has_key(self,key):
     return UserDict.has_key(self,lower(key))
 
-  def get(self,key,failobj):
+  def get(self,key,failobj = None):
     try:
       return self[key]
     except KeyError:


More information about the python-ldap mailing list