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/2006-July/067231.html below:

[Python-Dev] Explicit Lexical Scoping (pre-PEP?)

[Python-Dev] Explicit Lexical Scoping (pre-PEP?) [Python-Dev] Explicit Lexical Scoping (pre-PEP?)Fredrik Lundh fredrik at pythonware.com
Tue Jul 11 08:45:49 CEST 2006
Talin wrote:

> I also think that it won't be a complete disaster if we do nothing at 
> all - there *are* existing ways to deal with this problem; there are 
> even some which aren't hackish and non-obvious. For example, its easy 
> enough to create an object which acts as an artificial scope:
> 
>     def x():
>        scope = object()
>        scope.x = 1
>        def y():
>           scope.x = 2
> 
> To my mind, the above code looks about as elegant and efficient as most 
> of the proposals put forward so far, and it already works.
> 
> How much are we really saving here by building this feature into the 
> language?

I don't think anyone commented on my "mutable" post, but as I mentioned 
in that post, if you look at the use cases for this, what most use cases 
really need is *mutation*, not *rebinding*.

</F>

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