Yash-Varshney / tools-python

A Python library to parse, validate and create SPDX documents.
http://spdx.org
Apache License 2.0
0 stars 0 forks source link

why are relationships ordered? #3

Closed zvr closed 4 years ago

zvr commented 4 years ago

Why is the Relationship class ordered by using @total_ordering ?

When will you ever compare relationships to sort them?

Yash-Varshney commented 4 years ago

@zvr there is no particular use of total_ordering but it is also used in Annotator class (which is pretty similar in working with relationship) so for maintaining code similarity, I used it here.

zvr commented 4 years ago

Unless there is a reason, I'd suggest you remove all this extra code.

Yash-Varshney commented 4 years ago

I've removed the total_ordering feature from relationship.py file