Skip to content

Commit

Permalink
Remove override of UserDict.get() to avoid reimplementation
Browse files Browse the repository at this point in the history
Reimplements the parent class implementation. Can simplify classes by
removing it.

https://github.com/python-ldap/python-ldap/pull/136
  • Loading branch information
Jon Dufresne authored and Petr Viktorin committed Dec 18, 2017
1 parent 0625e19 commit ab93063
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions Lib/ldap/cidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ def has_key(self,key):
def __contains__(self,key):
return IterableUserDict.__contains__(self, key.lower())

def get(self,key,failobj=None):
try:
return self[key]
except KeyError:
return failobj

def keys(self):
return self._keys.values()

Expand Down
6 changes: 0 additions & 6 deletions Lib/ldap/schema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,6 @@ def has_key(self,nameoroid):
k = self._at2key(nameoroid)
return k in self.data

def get(self,nameoroid,failobj):
try:
return self[nameoroid]
except KeyError:
return failobj

def keys(self):
return self._keytuple2attrtype.values()

Expand Down

0 comments on commit ab93063

Please sign in to comment.