4 ms·
You can partially unpack in Python too: def method(self, *args): a, b = args[:2] super(self).method(*args[:2]) Perl's lack of using the definition f
by pyre 14y ago
You can partially unpack in Python too:
def method(self, *args):
a, b = args[:2]
super(self).method(*args[:2])
Perl's lack of using the definition for the variables doesn't necessarily make it 'more powerful.'
- chromatic 14y agoPython's approach is very reasonable. Both Perl and Python are nicer than C varargs.