[Python-Dev] "as" mania

Andrew Koenig ark at acm.org
Tue Mar 7 22:09:17 CET 2006

> Function arguments are not covered by this trick, but
>     def bar(z):
>         (x,y) = z
> probably isn't too much overhead...

It's not the machine overhead, it's the intellectual overhead.  I know there
are some who will disagree with me, but I would find it easier to read

	def foo(origin as (x1, y1), corner as (x2, y2)):

than to read

	def foo(origin, corner):
		(x1, y1) = origin
		(x2, y2) = corner

It's not a big deal, but it is not completely negligible either.

More information about the Python-Dev mailing list