Classes and modules are singletons?
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Thu Mar 6 15:57:46 EST 2008
On Thu, 06 Mar 2008 11:06:50 -0800, castironpi wrote:
> On Mar 6, 8:30 am, Carl Banks <pavlovevide... at gmail.com> wrote:
>> Anyway, the answer to what you are probably asking is No. Try this:
>>
>> >>>import module
>> >>>c1 = module.Someclass
>> >>>reload(module)
>> >>>c2 = module.Someclass
>> >>>c1 is c2
>
> What about
>
>>>> o= object()
>>>> b1= o.someattr
>>>> reload( o )
>>>> b2= o.someattr
>>>> b1 is b2
>
> ?
You are really a bit thick, a troll, or a bot.
*plonk*
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list