A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-June/054199.html below:

[Python-Dev] PEP 343 - next steps

[Python-Dev] PEP 343 - next steps [Python-Dev] PEP 343 - next stepsAndrew Koenig ark at acm.org
Mon Jun 13 22:24:37 CEST 2005
> > But I cannot do this:
> >
> > 	def f(x as (a, b)):
> > 		# ...

> > which is what I was suggesting.

> Yeah, I knew that. How important is that to you?

I would really have liked it for a program I was working on at one time that
had lots of small methods that passed around values of forms such as
(a,(b,c)).  Each method would pick one or more of the components out of its
compound value and then would sometimes pass the entire value down to the
next level.

Of course I could do it this way:

	def f(x):
		(a,(b,c)) = x
		# ...

but in this particular application, "as" would have offered significant
extra convenience.

I understand that this is not a real big deal, which is why I haven't
written up a PEP :-)


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4