"Steve R. Hastings" <[EMAIL PROTECTED]> writes: > On Thu, 04 May 2006 07:02:43 +1000, Gary Wessle wrote: > > b = 3 > > def adding(a) > > print a + b > > > > it seams not to see the up-level scope where b is defined. > > Assuming you put a ':' after the "def adding(a)", this should work in > recent versions of Python. In Python 2.0 and older, this will not work.
the example was an in-accuretlly representation of a the problem I am having. my apologies. a = [] def prnt(): print len(a) >>> prnt <function prnt at 0xb7dc21b4> I expect to get 0 "the length of list a" -- http://mail.python.org/mailman/listinfo/python-list