On 7/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it possible to do this without passing it as a function argument?
>

Sort of. Functions are objects in python, so you can set attribute on them. E.g.

def foo():
    return foo.c

foo.c = 1
print foo()

Which will print 1. Of course, it would generally be better to write
your own class for this sort of thing, so that you can set the
variable in the instance scope.

-- 
Evan Klitzke <[EMAIL PROTECTED]>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to