Use cases for del

Ron Adam rrr at ronadam.com
Fri Jul 8 21:21:39 CEST 2005


George Sakkis wrote:

> 
> How about using the right way of comparing with None ?
> 
> x = None
> t = time.time()
> for i in range(1000000):
>       if x is None:
>           pass
> print 'is None:',time.time()-t
> 
> I get:
> 
> None: 0.549999952316
> String: 0.498000144958
> is None: 0.450000047684

Yep, that occurred to me after I posted.  :-)



>>Anyway, time to call it a night so tomorrow I don't make anymore silly
>>mistakes on comp.lang.python. :)
> 
> 
> That would be a great idea ;-) An even greater idea would be to give up
> on this "None should mean undefined" babble; it looks like a solution
> looking for a problem and it raises more complications than it actually
> solves (assuming it does actually solve anything, which is not quite
> obvious).

Already gave up on it as a serious idea quite a while ago and said so in 
several posts.

 From two days ago... in this same thread ... I said.

 >>Yes, I agree using None as an alternative to delete currently is 
 >>unacceptable.

Cheers,
Ron




More information about the Python-list mailing list