[Python-Dev] Re: Nested functions and class scope
M.-A. Lemburg
mal@lemburg.com
Tue, 14 Nov 2000 15:23:50 +0100
John Max Skaller wrote:
>
> I think there is general agreement that lexically
> scoping functions inside functions will not break much code.
> Do you have an example of real application code where searching a class
> in which a function is defined will break code?
class Object:
type = 'typename'
def __init__(self, obj):
if type(obj) == types.IntType:
...
Basically all builtins which are in common use like open(), id()
type(), etc. would no longer be accessible.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/