Closed YehudaCorsia closed 4 years ago
Hey, i saw that you search for more optimal way to do __eq__ in SchemaNode and i am also saw that you use not optimal way in SchemaBuilder
__eq__
SchemaNode
SchemaBuilder
and also in SchemaNode you do return self.to_schema() == other.to_schema() and to_schema() is big function that might take a lot of time.
return self.to_schema() == other.to_schema()
to_schema()
i am think have a better solution that you can use:
def __eq__(self, other): return (isinstance(other, self.__class__) and self.__dict__ == other.__dict__)
I just created a pull request with the new code...
This should be updated in the next release.
Fixed in v1.2.0
v1.2.0
Hey, i saw that you search for more optimal way to do
__eq__
inSchemaNode
and i am also saw that you use not optimal way inSchemaBuilder
and also in
SchemaNode
you doreturn self.to_schema() == other.to_schema()
andto_schema()
is big function that might take a lot of time.i am think have a better solution that you can use: