A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-November/010600.html below:

Nested functions and class scope

[Python-Dev] Re: Nested functions and class scope [Python-Dev] Re: Nested functions and class scopeM.-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/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4