Perl is worse!

Ben Wolfson rumjuggler at cryptarchy.org
Sat Jul 29 00:57:01 EDT 2000


On Sat, 29 Jul 2000 04:45:14 GMT, jeff at ollie.clive.ia.us (Jeffrey C. Ollie)
wrote:

>On Sat, 29 Jul 2000 03:43:38 GMT, Ben Wolfson <rumjuggler at cryptarchy.org> wrote:
>>>>> def getnone():
>>	pass
>>
>>>>> import __builtin__
>>>>> __builtin__.None = 1
>>>>> type(getnone())
>><type 'None'>
>
>
>I think that you are not fully comprehending the difference in Python
>between variables and objects.  Variables in Python are nothing more
>that references to objects. When you type 'None' in a program, Python
>uses the object (usually, the 'None' object) referenced by the label
>'None'. As you have found out, you can change which object that the
>label 'None' references.

I was actually trying to show that even if you modify __builtin__.None, it
is recoverable.  With that function (or any function that doesn't return a
value, but that one has no other purpose) you would just do
__builtin__.None = getnone() and all would be well in the world again.

-- 
Barnabas T. Rumjuggler

The world is turning into a cesspool of imbeciles.
 -- Harlan Ellison



More information about the Python-list mailing list