Evaluating python - a question
tanzer at swing.co.at
Fri May 18 01:51:47 EDT 2001
Sheila King <sheila at spamcop.net> wrote:
> As for the typos, I just imagine that the error messages in the code,
> will point you to a line number near to where the error is occurring,
> and you will trace it back through the code. I don't think it is like
> randomly searching through a haystack for a needle.
The problem are typos that are triggered rarely (e.g., in an exception
handler) -- you may correct the typo in 1 minute but your customer
might not be amused by seeing a stacktrace.
As others already pointed out, unit-tests are the answer (and will
catch a lot more bugs than static type checking, too).
> Other than that, the suggestion to use accessor methods, instead of
> accessing the datamembers directly, is probably another good tip.
Accessor methods won't do anything to prevent typos -- you have an
equal chance of mistyping the name of the accessor as mangling the
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list