multidict.py (13663:9b64aeabf9a5) multidict.py (13675:afeab32b3655)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 29 unchanged lines hidden (view full) ---

38
39 def __str__(self):
40 return str(dict(self.items()))
41
42 def __repr__(self):
43 return `dict(self.items())`
44
45 def __contains__(self, key):
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 29 unchanged lines hidden (view full) ---

38
39 def __str__(self):
40 return str(dict(self.items()))
41
42 def __repr__(self):
43 return `dict(self.items())`
44
45 def __contains__(self, key):
46 return self.local.has_key(key) or self.parent.has_key(key)
46 return key in self.local or key in self.parent
47
48 def __delitem__(self, key):
49 try:
50 del self.local[key]
51 except KeyError as e:
52 if key in self.parent:
53 self.deleted[key] = True
54 else:

--- 130 unchanged lines hidden ---
47
48 def __delitem__(self, key):
49 try:
50 del self.local[key]
51 except KeyError as e:
52 if key in self.parent:
53 self.deleted[key] = True
54 else:

--- 130 unchanged lines hidden ---