problem with defining a global class instance

Fredrik Lundh fredrik at pythonware.com
Fri Nov 17 02:37:19 EST 2006


sharath B N wrote:

> def generate (... ,....,...)
> 
> " in this function i define the global variables "
> global  stock,stockManager, manager etc.
> 
> 
> class Manager
> ...
> ...
> ...
> def  create_stockManager(..)
> """ this is a method in class manager"""
> stockManager = StockManager( name)
> stockManager.create_Stock(..)
> 
> now this gives an attribute error sayin .... stockManager has no
> attribute create_Stock

so where is it?

</F>




More information about the Python-list mailing list