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