by m3047 · 3y ago · 0 comments
Given:
def foo(*args):
print(args)
return
class Thing(object):
def __init__(self,a,b):
self.a = a
self.b = b
return
def foo_style(self):
return (self.a, self.b)
args is not required to refer to a tuple: >>> foo(*[31,42])
(31, 42)
I can have objects construct parameters conforming to the specifications for a signature: >>> foo(*Thing(3,91).foo_style())
(3, 91)
Consider that a counterexample.