Scopes and exceptions
Magnus Heino
magnus.heino at rivermen.se
Fri Dec 15 03:33:46 EST 2000
More information about the Python-list mailing list
Fri Dec 15 03:33:46 EST 2000
- Previous message (by thread): Scopes and exceptions
- Next message (by thread): comments of python by a perl user
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could someone please explain this to me: [magnus at daysleeper magnus]$ cat e.py a = 'test' b = 'test' print 'a = %s' % id(a) print 'b = %s' % id(b) def func(): print "'test' = %s" % id('test') func() try: test, '%s' % (a,) except NameError, e: print 'e = %s' % id(e) print 'a = %s' % id(a) print 'b = %s' % id(b) print "'test' = %s" % id('test') [magnus at daysleeper magnus]$ python e.py a = 136227368 b = 136227368 'test' = 136227368 e = 135997204 a = 136227368 b = 136227368 'test' = 136227368 [magnus at daysleeper magnus]$ /Magnus
- Previous message (by thread): Scopes and exceptions
- Next message (by thread): comments of python by a perl user
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list