condition and True or False

Vito 'ZeD' De Tullio zak.mc.kraken at libero.it
Sun May 2 14:35:29 EDT 2010


Peter Otten wrote:

> def f():
>     big_beast = list(range(10**100))
>     return big_beast and True or False
> x = f()
> 
> it would prevent that a big_beast reference becomes visible outside the
> function and allow for immediate release of its memory.

what's wrong in bool(big_beast)?

-- 
By ZeD




More information about the Python-list mailing list