[Tutor] Is my style OK in this elementary student exercise?
Angus Rodgers
angusr at bigfoot.com
Sat Jul 4 14:26:12 CEST 2009
Fear not, I won't post all my exercises to the Tutor list! But
when I seem to be doing something a little elaborate, it seems a
good idea to ask if I'm doing anything silly. In this exercise:
<http://python.pastebin.com/d7e245e0f> (retention: 1 day)
my /conscious/ worries are:
(i) trapping the exception StandardError may, for all I know,
be a daft thing to do;
(ii) I'm not bothering to be consistent in my use of single and
double string quotes (but I don't know how much difference this
makes, to readability and/or reliability);
(iii) some of my lines of code extend beyond 79 characters (but
again, I don't know how much this matters);
(iv) correlatively with (iii), my indentation perhaps looks a
little extreme (perhaps suggesting a redesign, I don't know);
(v) I'm bound to be doing other silly things that I don't even
know about ("unknown unknowns").
Any comments? (I don't expect the Spanish Inquisition!)
--
Angus Rodgers
More information about the Tutor
mailing list