Python and Perl 6 Similarities between Python and Perl 6 #20

Variadic positional parameters

Variadics use a leading *

# Python:
def xyz(a, b, *c):
    ...
 
 
# Perl 6:
sub xyz($a, $b, *@c) {
    ...
}
 
 
# Perl 5:
sub xyz {
    my ($a, $b, @c) = @_;
    ...
}
Copyright © 2010
http://www.pmichaud.com/2010/pres/