namespaces & indentation
Erno Kuusela
erno-news at erno.iki.fi
Sat Dec 23 08:27:47 EST 2000
>>>>> "Chris" == Chris Schaller <Chris.Schaller at web.de> writes:
| I've already taken a look in my despair at that document, but
| couldn't believe that the smallest piece of code with its own
| namespace is a function.
well, keep trying :)
| This implies (at least to me) to keep functions as small as
| possible in order to avoid further complications (at least some
| functional programming philosophy...).
what complications?
it's good to keep your functions reasonably small, but
"as small as possible" is probably too small :)
try reading some existing python code.
|| 1. Strive to test all paths thru each function (good advice
|| regardless of language).
| That's right, but that's not so easy in Python (sorry, I'm a little
| bit fastidious from using FPLs) due to its dynamics. Otherwise such
| cases would have been analyzed and criticized when parsing the
| function. The same applies to a function that gets a wrong argument
| type and runs amuck.
static typing is no substitute for actually testing the code!
-- erno
More information about the Python-list
mailing list