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-April/052906.html below:

[Python-Dev] Re: anonymous blocks

[Python-Dev] Re: anonymous blocksAndrew Koenig ark-mlist at att.net
Mon Apr 25 17:00:16 CEST 2005
>  Mixing both suggestions:
> 
>  from <target> as <value>:
>      <BODY>
> 
>  That resembles an import statement which some
>  may consider good (syntax/keyword reuse) or
>  very bad (confusion?, value focus).

I have just noticed that this whole notion is fairly similar to the "local"
statement in ML, the syntax for which looks like this:

	local <declarations> in <declarations> end

The idea is that the first declarations, whatever they are, are processed
without putting their names into the surrounding scope, then the second
declarations are processed *with* putting their names into the surrounding
scope.

For example:

	local
		fun add(x:int, y:int) = x+y
	in
		fun succ(x) = add(x, 1)
		
	end

This defines succ in the surrounding scope, but not add.

So in Python terms, I think this would be

	local: <suite> in: <suite>

or, for example:

	local: <target> = value
	in:
		blah
		blah
		blah



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