New Test Version Attached
Changelog:
Version 1.2.11 - 29 Sep 2020
Better more compatibility with Python 3
Two important things about this:
- A book in the library that has never had a series set comes up a little differently than one that had a series at one time, but doesn't anymore. That's why I didn't see it at first.
- In Python2, you could compare any two values or variables and value None (of type NoneType) was considered 'less' than anything you compared it with. Python3 incompatibly changed that to 'you can't compare None to anything.
So I, thinking I was clever, changed where this plugin returned
None as a default series index to
float(-inf), so that it would still be 'less than anything else'.
That's when another pythonic habit bit me--
None is always considered False when used in a boolean (as is 0 and empty string('')), so it's common to just do "
if var:"
But "
if float(-inf):" evaluates to True. Thereby changing the behavior.
So this version returned
0 where it used to be
None instead of
float(-inf).