Correct. Having proposed the "frowing Guido" diglyph ":(" as a
block delimiter, I figured I has used up my quota of smileys.
It wasn't a serious attempt at THE solution, but a demonstration.
> A safer approach would be to have a new built-in function bind() which
> takes a function object and a dictionary as arguments and returns a
> *new* function object which is the binding of the old function's code
> object with the given dictionary. (This also keeps the idea of
> functions as immutable objects, which I like.)
Which is exactly what I thought I was demonstrating the need for.
( But it's always easier to prototype a solution in Python before
hacking at the interpreter. I just had to take out one more
READONLY from the previous change to add documentation objects. )
> [ some discussion of nested scopes edited. ]
> Personally, I'd hate to see a Python programming style develop where
> people code their entire program as a set of nested functions, a la
> Pascal -- I'd much rather encourage people to use a more
> object-oriented style instead based upon multiple modules instead.
Although I also proposed nested scopes with LET, I share some of your
> PS It don't think the argument exists that will convince *me* that
> Python needs explicit open/close brackets, even optional ones. So
> you're all wasting your breath on that one :-)
No "frowning Guido" ?
- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics