> That sounds like a bug, not a feature. It's frequently useful to have > forward references in function bodies to names that are not yet globally > bound, e.g. for classes, or mutually-recursive functions.
The trouble is that you don't necessarily know in what scope they will be defined, so I think that forcing you to be explicit about it is useful. Can you show me an example of where you think it isn't? Incidentally, I think that lexical scoping would also deal with the problem that people often encounter in which they have to write things like "lambda x=x:" where one would think "lambda x:" would suffice. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com