This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aptshansen
Recipients
Date 2007-03-17.04:47:27
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I think the basis of this patch is a good one; I think 'delimiter' should be plural as delimiters, but that might be all picky. :)

I don't think "self.delimmap = map(lambda x: x, self.delim)" should be done; map and lambda aren't needed here. Wouldn't it be cleaner to just accept a list and join it instead? More Pythonic? Since delimiter=":=" to me looks like you want the string ":=" to be a delimiter, but I might be having pascal flashbacks. To me its more clear.

E.g.:

def __init__(self, defaults=None, delimiters=(':', '=')):
    self._delimiters = ''.join(delimiters)

As stated below, you don't need delimmap; "if vi in self.delim" will work fine.

Anyways, all that aside (and that's just opinions, but--):
  1) The patch no longer applies cleanly to the HEAD. I believe it would be very straightforward to fix the patch up though.
  2) It needs documentation, and
  3) It definitely needs tests added to test_cfgparser.
History
Date User Action Args
2007-08-23 15:42:14adminlinkissue1165404 messages
2007-08-23 15:42:14admincreate