On Wed, Nov 26, 2008 at 9:30 AM, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> Here is a file "test_import_scope.py":
> ##
> class a():
> import re
> def __init__( self ):
> if re.search( "to", "toto" ):
> self.se = "ok!"
> def print_se( self ):
> print self.se
>
Hi everybody,
Here is a file "test_import_scope.py":
##
class a():
import re
def __init__( self ):
if re.search( "to", "toto" ):
self.se = "ok!"
def print_se( self ):
print self.se
a().print_se()
##
When python executes this file, we obtain an error: