On Tue, 07 Feb 2006 18:10:05 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
[...]
>----< ernesto.py >---------------------------------------------------------
[...]
Just noticed:
> substrings = line.split()
> if substrings and isinstance(substrings, list) and substrings[0] ==
> 'Name:':
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--not needed
str.split always returns a list, even if it's length 1, so that was harmless
but should be
if substrings and substrings[0] == 'Name:':
(the first term is needed because ''.split() => [], to avoid [][0])
Sorry.
Regards,
Bengt Richter
--
http://mail.python.org/mailman/listinfo/python-list