File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,23 +232,16 @@ def to_dict(self):
232232 dict_ = vars (self )
233233 return dict ([(attr_name , _meta [attr_name ].from_python (attr_value ))
234234 for attr_name , attr_value in dict_ .items ()])
235- # I don't understand what this is trying to do.
236- # whatever it was meant to do is broken and is breaking the ability to call "vars" on instantiations, which is breaking all kindsa shit. -AS
237- #_contribute_method("__dict__", to_dict)
238235
239236 def iterate (self ):
240- not_empty = lambda e : e [1 ] is not None # AS I *think* this is what was intended.
237+ not_empty = lambda e : e [1 ] is not None
241238 return iter (filter (not_empty , vars (self ).items ()))
242239 _contribute_method ("__iter__" , iterate )
243240
244241 result_cls = super_new (cls , name , bases , attrs )
245242 result_cls .__doc__ = doc_generator (result_cls .__doc__ , _meta )
246243 return result_cls
247244
248- def contribute_method_to_cls (cls , name , func ):
249- func .func_name = name
250- return func
251-
252245
253246class BaseData (object ):
254247 __metaclass__ = BaseDataType
You can’t perform that action at this time.
0 commit comments