Show More
@@ -278,11 +278,16 b' def xiter(item, mode):' | |||
|
278 | 278 | func = item.__xiter__ |
|
279 | 279 | except AttributeError: |
|
280 | 280 | if isinstance(item, dict): |
|
281 |
|
|
|
281 | def items(item): | |
|
282 | fields = ("key", "value") | |
|
283 | for (key, value) in item.iteritems(): | |
|
284 | yield Fields(fields, key=key, value=value) | |
|
285 | return items(item) | |
|
282 | 286 | elif isinstance(item, new.module): |
|
283 | 287 | def items(item): |
|
288 | fields = ("key", "value") | |
|
284 | 289 | for key in sorted(item.__dict__): |
|
285 |
yield |
|
|
290 | yield Fields(fields, key, getattr(item, key)) | |
|
286 | 291 | return items(item) |
|
287 | 292 | elif isinstance(item, basestring): |
|
288 | 293 | if not len(item): |
General Comments 0
You need to be logged in to leave comments.
Login now