Skip to content

Commit ab93063

Browse files
jdufresneencukou
authored andcommitted
Remove override of UserDict.get() to avoid reimplementation
Reimplements the parent class implementation. Can simplify classes by removing it. python-ldap#136
1 parent 0625e19 commit ab93063

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

Lib/ldap/cidict.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ def has_key(self,key):
4444
def __contains__(self,key):
4545
return IterableUserDict.__contains__(self, key.lower())
4646

47-
def get(self,key,failobj=None):
48-
try:
49-
return self[key]
50-
except KeyError:
51-
return failobj
52-
5347
def keys(self):
5448
return self._keys.values()
5549

Lib/ldap/schema/models.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,6 @@ def has_key(self,nameoroid):
679679
k = self._at2key(nameoroid)
680680
return k in self.data
681681

682-
def get(self,nameoroid,failobj):
683-
try:
684-
return self[nameoroid]
685-
except KeyError:
686-
return failobj
687-
688682
def keys(self):
689683
return self._keytuple2attrtype.values()
690684

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy