Closed SebDieBln closed 3 years ago
Hi! Apologies for the delay!! Just to make sure I understand your fix - this is ensuring we can iterate over arguments
more than once by converting it from a generator into a list, yes?
Hi @nhoad
thanks for getting back to me.
This PR is not about generator vs. list but about the meaning of the number that is associated with an unused argument (variable i
in line 73).
We need that number to be the index within the original argument list. (Because we want to ignore an unused argument if it is the first argument in the original argument list.)
Before this PR however that number is an index within the list of unused arguments. This has the effect that instead of only ignoring an unused argument if it is the first argument we always ignore the first unused argument, no matter what its position is. (of course this all applies only to "classmethod"s).
@classmethod
def someMethod(cls, foo):
# Note that 'foo' is not used by this function.
# It is not the *first* argument, but it is the *first unused* argument.
print(cls)
Since foo
is the first unused argument it is currently ignored, even though it is not the first argument.
Awesome, that was a great explanation! Thank you Sebastian!!
I've pushed v0.0.7 to pypi now. Thanks again!
This PR fixes #6.