Python Lint? (was "Can Python supplant Java?")
claird at starbase.neosoft.com
Fri Aug 23 03:02:12 CEST 2002
In article <mailman.1030039414.14818.python-list at python.org>,
Webb Sprague <wsprague100 at yahoo.com> wrote:
>It seems to me that it would be pretty easy to address
>the type checking question by some thing like the
>When you are going to use a variable, assign it a
>default in the appropriate type (stringv = '', intv =
>0, etc). Run the Python script through a lint type
>program that would flag any variables assigned to
>without such a "declaration" or any variables assigned
>a new type.
>I have been helped by Perl's "use strict;" / "my"
>feature many times. My idea might approximate it.
Yes, this could be done.
I think it'd be the wrong answer to "the type-checking
question"; more precisely, it's a distraction from
more meaningful validation mechanisms.
My sense of good Python style is that it's rather
relaxed about the notion of type hygiene you seem to
have in mind here, BUT big on gneral cleanliness and
testability. Crudely, getting types right is a minor
<URL: http://www.unixreview.com/documents/s=2426/uni1018986621203/0204h.htm >
might interest you.
Cameron Laird <Cameron at Lairds.com>
More information about the Python-list