Python is readable

Steven D'Aprano steve+comp.lang.python at
Fri Mar 16 17:25:32 CET 2012

On Fri, 16 Mar 2012 13:55:06 +0100, Kiuhnm wrote:

>> I don't understand the reason for $arg1 and $arg2. Is there some reason
>> why the code couldn't do this instead?
>>         my(@list1, @list2) = @_;
> @_ contains references to arrays. You can't pass two arrays to a
> function.

Why ever not? That seems like basic functionality to me. I can't imagine 
any modern language that lacks such a simple feature. Even Pascal allows 
you to pass arrays as arguments to functions.

Is there some design principle that I'm missing that explains why Perl 
lacks this feature?


More information about the Python-list mailing list