Changeset 24
- Timestamp:
- 08/14/05 07:10:08 (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
lib/syck/dumpers.py (modified) (2 diffs)
-
tests/test_pickle.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/syck/dumpers.py
r23 r24 121 121 122 122 def represent_type(self, object): 123 # TODO: Python 2.2 does not provide the module name of a function 123 124 name = '%s.%s' % (object.__module__, object.__name__) 124 125 return _syck.Scalar('', tag="tag:python.yaml.org,2002:name:"+name) 125 126 represent_classobj = represent_type 127 represent_class = represent_type 126 128 represent_function = represent_type 127 129 represent_builtin_function_or_method = represent_type … … 153 155 class_name = '%s.%s' % (cls.__module__, cls.__name__) 154 156 args = () 157 state = {} 155 158 if cls.__reduce__ is type.__reduce__: 156 159 if hasattr(object, '__reduce_ex__'): -
trunk/tests/test_pickle.py
r22 r24 85 85 return self 86 86 87 def __cmp__(self, other): 88 return cmp((type(self), self.foo, self.bar, self.baz), 89 (type(other), other.foo, other.bar, other.baz)) 90 87 91 def __eq__(self, other): 88 92 return type(self) is type(other) and \ … … 95 99 self.bar = bar 96 100 self.baz = baz 101 102 def __cmp__(self, other): 103 return cmp((type(self), self.foo, self.bar, self.baz), 104 (type(other), other.foo, other.bar, other.baz)) 97 105 98 106 def __eq__(self, other):
Note: See TracChangeset
for help on using the changeset viewer.
