Python equivalent of 'use strict'

David Lees DavidLNoNoSpammy at raqia.com
Tue Jan 16 12:24:29 EST 2001


I finally got my perl/C++ guru friend to look at Learning Python and
some of my code.  He had some (unreasonable?) questions that maybe
someone can comment on.

Is there an equivalent to the perl 'use strict'?  He is concerned with
accidentally initializing values of mistyped variables.  I showed him
how you get an error doing an operation with an uninitialized variable
such as the following:

foo = 1
fooo += 5

But he is looking for this 'use strict' stuff.


david lees



More information about the Python-list mailing list