Changeset 148
- Timestamp:
- 04/22/06 17:08:32 (2 years ago)
- Files:
-
- pyyaml/trunk/lib/yaml/representer.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pyyaml/trunk/lib/yaml/representer.py
r147 r148 242 242 else: 243 243 state = data.__dict__.copy() 244 if isinstance(state, dict): 245 state = state.items() 246 state.sort() 244 247 return self.represent_mapping(tag, state, flow_style=flow_style) 245 248 … … 373 376 state = data.__dict__ 374 377 if args is None and isinstance(state, dict): 378 state = state.items() 379 state.sort() 375 380 return self.represent_mapping( 376 381 u'tag:yaml.org,2002:python/object:'+class_name, state) … … 431 436 if not args and not listitems and not dictitems \ 432 437 and isinstance(state, dict) and newobj: 438 state = state.items() 439 state.sort() 433 440 return self.represent_mapping( 434 441 u'tag:yaml.org,2002:python/object:'+function_name, state)
