Twice instanciation
anton muhin
antonmuhin.REMOVE.ME.FOR.REAL.MAIL at rambler.ru
Fri Jun 13 12:23:56 EDT 2003
Salvatore wrote:
> Hello,
>
> Is it possible to avoid twice instanciation
> of the same variable ?
>
> class Global:
> def __init__(self,init=0):
> self.value = init
>
> g = Global() #instanciating one time ok
> g = Global() #instanciating two times would raise an exception
>
>
> Regards
>
> Salvatore
>
Bindings class might be of help (see
http://www-106.ibm.com/developerworks/linux/library/l-prog2.html for
more details).
hth,
anton.
More information about the Python-list
mailing list