- It can be done! -
Please email me as sch...@eprover.org (Stephan Schulz)
--
http://mail.python.org/mailman/listinfo/python-list
-------
Please email me as [EMAIL PROTECTED] (Stephan Schulz)
--
http://mail.python.org/mailman/listinfo/python-list
__call__(self):
self.static_var+=1
return self.static_var
fun_with_state = hidden()
>>> fun_with_state()
1
>>> fun_with_state()
2
>>> fun_with_state()
3
>>> fun_with_state()
4
Bye,
Stephan
--
-- It can be done! ------
for any input!
Bye,
Stephan
--
-- It can be done! -
Please email me as [EMAIL PROTECTED] (Stephan Schulz)
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Fredrik Lundh wrote:
>Stephan Schulz wrote:
>
>> Is there a (portable, standard) way for the program/module to find out
>> if it is imported or executed stand-alone?
>
>if a module is executed, it's name is set to "__main
-- It can be done! -
Please email me as [EMAIL PROTECTED] (Stephan Schulz)
--
http://mail.python.org/mailman/listinfo/python-list