Show More
@@ -219,19 +219,13 b' class Config(dict):' | |||||
219 | return False |
|
219 | return False | |
220 | return remainder in self[first] |
|
220 | return remainder in self[first] | |
221 |
|
221 | |||
222 | # we always have Sections |
|
222 | return super(Config, self).__contains__(key) | |
223 | if _is_section_key(key): |
|
223 | ||
224 | return True |
|
|||
225 | else: |
|
|||
226 | return super(Config, self).__contains__(key) |
|
|||
227 | # .has_key is deprecated for dictionaries. |
|
224 | # .has_key is deprecated for dictionaries. | |
228 | has_key = __contains__ |
|
225 | has_key = __contains__ | |
229 |
|
226 | |||
230 | def _has_section(self, key): |
|
227 | def _has_section(self, key): | |
231 |
|
|
228 | return _is_section_key(key) and key in self | |
232 | if super(Config, self).__contains__(key): |
|
|||
233 | return True |
|
|||
234 | return False |
|
|||
235 |
|
229 | |||
236 | def copy(self): |
|
230 | def copy(self): | |
237 | return type(self)(dict.copy(self)) |
|
231 | return type(self)(dict.copy(self)) |
General Comments 0
You need to be logged in to leave comments.
Login now