Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6698 > unrolled thread

Re: scope of function parameters (take two)

Started byDaniel Kluev <dan.kluev@gmail.com>
First post2011-05-31 14:18 +1100
Last post2011-05-31 14:18 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: scope of function parameters (take two) Daniel Kluev <dan.kluev@gmail.com> - 2011-05-31 14:18 +1100

#6698 — Re: scope of function parameters (take two)

FromDaniel Kluev <dan.kluev@gmail.com>
Date2011-05-31 14:18 +1100
SubjectRe: scope of function parameters (take two)
Message-ID<mailman.2292.1306811932.9059.python-list@python.org>
On Tue, May 31, 2011 at 2:05 PM, Chris Angelico <rosuav@gmail.com> wrote:
> Infinitely-nested scoping is simply one of the casualties of a
> non-declarative language.

Well, this is not accurate, as you can have 'infinitely-nested
scoping' in python, in form of nested functions. For example, you can
use map(lambda x: <expressions with x, including other
map/filter/reduce/lambda's>, list_of_x), and you will have your
isolated scopes. Although due to lambdas supporting only expressions,
following this style leads to awkward and complicated code (and/or
instead if, map instead for, and so on).


-- 
With best regards,
Daniel Kluev

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web