isodate.duration.Duration: Duration comparison is inconsistent?
问题 This is copied straight out of my console: >>> import isodate >>> import datetime First statements are as expected. 1 month duration not longer than 10 years duration. >>> duration = isodate.parse_duration("P1M") >>> duration > isodate.duration.Duration(0, 0, 0, years=10, months=0) False But then I get 1 month duration is longer than 10 years duration all of a sudden. >>> duration = isodate.parse_duration("P1M") >>> isinstance(duration, isodate.Duration) True >>> duration > isodate.duration