tt = a, b = t

rihad rihad at mail.ru
Mon Jan 14 04:56:37 EST 2002


On Mon, 14 Jan 2002 09:34:47 +0000 (UTC), Duncan Booth
<duncan at NOSPAMrcp.co.uk> wrote:

>Gareth.McCaughan at pobox.com (Gareth McCaughan) wrote in 
>news:slrna43n31.2spv.Gareth.McCaughan at g.local:
>
>>> How did 2 manage to propagate to tuptup through None?
>> 
>> None is just an ordinary name. You changed its value to 2.
>> I strongly recommend you not to do that again. :-)
>> 
>To be accurate, he didn't change the value of None. He created a new 
>global variable called None. The original value is a builtin, and is still 
>present. The new value simply hides the old one and 'del None' will make 
>the builtin value visible again. 
Hmm, I tried what you implicitly suggested :-) (__builtins__.None = 1)
It worked... Now, isn't that a threat to security?

if something is None:
  # deny access
else:
  # allow access

Then maybe it's not the case.




More information about the Python-list mailing list