Closed CrazyIvan359 closed 3 years ago
Sorry about the delay. Thanks. Cherry-picked in 9c1a4f3 in devel.
Just saw that you change from my list comprehension to the *
sequence expansion, I don't think that works in Python 2 which is why I used list comp in the error message.
@CrazyIvan359 Are you thinking of an older Python 2? It works in Python 2.7:
Python 2.7.18 (default, Sep 5 2020, 11:17:26)
[GCC 10.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> version = (1, 2)
>>> "foobar {}.{}".format(*version)
'foobar 1.2'
>>>
Hmm... Maybe it's lists you can't do it with then? I remember I've had errors thrown at me for using that operator in 2.7 before. If it works here then all good!
Lists work too. Maybe you ran into this one: https://stackoverflow.com/questions/22257930/python-2-tuple-list-unpacking-using-star-throws-syntaxerror , which is Python 3 only. In any case, I tested the current code with both 2 and 3, so we should be good.
That looks familiar, yes.
Fixes #48 as discussed