Changeset 49 for trunk/lib/syck/dumpers.py
- Timestamp:
- 02/19/06 03:10:24 (7 years ago)
- File:
-
- 1 edited
-
trunk/lib/syck/dumpers.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/syck/dumpers.py
r36 r49 144 144 return _syck.Scalar(value, tag="tag:yaml.org,2002:float") 145 145 146 def represent_complex(self, object): 147 if object.real != 0.0: 148 value = '%s+%sj' % (repr(object.real), repr(object.imag)) 149 else: 150 value = '%sj' % repr(object.imag) 151 return _syck.Scalar(value, tag="tag:python.yaml.org,2002:complex") 152 146 153 def represent_sets_Set(self, object): 147 154 return _syck.Seq(list(object), tag="tag:yaml.org,2002:set") … … 165 172 represent_function = represent_type 166 173 represent_builtin_function_or_method = represent_type 174 175 def represent_module(self, object): 176 return _syck.Scalar('', tag="tag:python.yaml.org,2002:module:"+object.__name__) 167 177 168 178 def represent_instance(self, object):
Note: See TracChangeset
for help on using the changeset viewer.
