declaration of variables?

Alex Martelli aleaxit at
Mon Feb 17 15:27:17 CET 2003

André Jonsson wrote:

> Laura Creighton wrote:
>> Am I understanding you correctly?  You don't want to bind a variable
>> to a specific type, and you want to be able to rebind a variable at
>> will to any other type, but you want a language change so that the
>> first time you bind a variable, you have to type something extra
>> indicating 'yes I know this is the first time I have used this
>> variable?'  If so, what does this buy you aside from catching typos?
> Now, hold your horses there... I'm pretty sure I didn't say I wanted
> anything, other than understanding.

You said, and I quote:  "it shouldn't be possible to do this kind of error 
without the compiler complaining".  "Should" is most often taken as
prescriptive in intent, so it's not surprising that this assertion was
taken as indicating desire for a change to the language.

> My original point was that I like having to be forced (hm, that didn't
> sound right) 

Python isn't much of a language for bondage-and-discipline programming; if
that IS your kink, many other languages will be vastly more accomodating
to it, and indeed some _focus_ on it.

> Thanks all for trying to "convert me", but I think I got it now, and I'll


> try to
> improve on the unit-test side in the future  :-)

Yes, I do think you've got it;-).  Not that an occasional run of PyChecker
isn't a good idea -- but if it finds legitimate problems, take that as an
indication that your unit tests are insufficient;-).


More information about the Python-list mailing list