In fixing priority sort for todo.py I noticed a case of the diaper pattern:
try:
pa = int(self.getat(a[1], 'priority'))
except:
pa = -1
instead of
try:
pa = int(self.getat(a[1], 'priority'))
except ValueError:
pa = -1
called the diaper pattern because it catches all the...
(language note: non-American English calls 'diapers' 'nappies')
well, anyway, a quick grep suggests it occurs quite often in Leo. Should it?
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.