Python's biggest compromises
Beni Cherniavsky
cben at tx.technion.ac.il
Sun Aug 3 05:36:21 EDT 2003
anthony_barker at hotmail.com (Anthony_Barker) wrote:
> What to you think python largest compromises are?
>
As everybody said, whitespace, dynamic typing and interpretedness are
not
compromises.
One real compromise is the fact that you can't rebind an outer
variable from a
closure. That allows lexical scoping without any variable declrations
at the
price of giving up a useful ability of closures. When you do want it,
you must
either use the singleton list hack (but charactertistically, it isn't
used even
once in the standard library - I once performed an almost reliable
search), or
turn your nested function into a class just for that, which is
annoying (see
Java <wink>). It's noty impossible to fix, it will just require some
sort of "declration" (per assignment, per variable per function (like
``global``) or per
function) for the cases when you want this).
More information about the Python-list
mailing list