@@ -221,16 +221,12 @@ are unusual for lexically scoped languages; there is typically a
221
221
mechanism to create name bindings (e.g. lambda and let in Scheme)
222
222
and a mechanism to change the bindings (set! in Scheme).
223
223
224
- XXX Alex Martelli suggests comparison with Java, which does not
225
- allow name bindings to hide earlier bindings.
226
224
227
225
Examples
228
226
========
229
227
230
228
A few examples are included to illustrate the way the rules work.
231
229
232
- XXX Explain the examples
233
-
234
230
::
235
231
236
232
>>> def make_adder(base):
@@ -289,8 +285,6 @@ The call to ``g()`` will refer to the variable i bound in ``f()`` by the for
289
285
loop. If ``g()`` is called before the loop is executed, a NameError will
290
286
be raised.
291
287
292
- XXX need some counterexamples
293
-
294
288
Backwards compatibility
295
289
=======================
296
290
@@ -479,8 +473,6 @@ straightforward manner, they are preferred.
479
473
Implementation
480
474
==============
481
475
482
- XXX Jeremy, is this still the case?
483
-
484
476
The implementation for C Python uses flat closures [1]_. Each def
485
477
or lambda expression that is executed will create a closure if the
486
478
body of the function or any contained function has free
@@ -504,8 +496,6 @@ that access an enclosing scope is returned, should not prevent
504
496
unreferenced objects from being reclaimed by the garbage
505
497
collector.
506
498
507
- XXX Much more to say here
508
-
509
499
References
510
500
==========
511
501
@@ -517,7 +507,6 @@ References
517
507
Copyright
518
508
=========
519
509
520
- XXX
521
510
522
511
..
523
512
Local Variables:
0 commit comments