Closed ana-lyons closed 5 years ago
Thanks. There was a bug in the links for the last night, since each case (first night, middle night, last night) had a different set of formatting strings, but were all passed the same inputs as positional arguments. I updated this to create a dictionary of the various prev_str, next_str, etc., and then each type of link title bar could pick out by name exactly which ones it needed.
Something new I learned: python string formatting will complain if there are too few arguments (I knew that) but it won't complain if there are too many arguments (I didn't know that). i.e.
"{} {}".format(1) #- error
"{}".format(1,2) #- uses the 1 but silently ignores the 2
I disabled the "prev" link for the first night and the "next" link for the last night.