Guide to the python interp. source?

Andreas Kostyrka andreas at kostyrka.priv.at
Sun Jul 28 10:45:19 EDT 2002


Am Sam, 2002-07-27 um 15.19 schrieb Tim Gahnström /Bladerman:
> Maybe, maybe not,
> Maybe I can just convert everything internaly to uppercase? I don't know,
> havn't given it much thought yet.
Probably not. You should try first to see how many collisions you get by
going case insensitive.

> I have thought about that and that is not what I want. In this particular
> case I want an integer object to be created with the value 2, that is sent
> to inc and changed but when we come to the next line that object will be
> garbage collected because none have a refference to it.
> Inc will work as it is supposed to do wich is good if you just want to have
> the sidefects of it. An other possibility would be to generate a good
> looking errormessage. Because it is likely a mistake.
Nope it is not.
Or you forbid also constructs like:
sys.stdout.write("Hello World\n")
which would have to be written like:
dummyvar="Hello World\n"
sys.stdout.write(dummyvar)
> > The hard part comes in determining what you want to
> > happen on e.g.:
> >         f(x, x.y, x.y.z, x.y.z.t)
> 
> Cheesch! I will consider that by christmas :-)
Especially, if x happens to be an object that is readonly (throws just
exceptions upon __setattr__ :) )

Or better even:
f(__debug__)
(__debug__ happens to be 100% readonly variable, because it changes the
way the compiler works :)

Andreas





More information about the Python-list mailing list