Michael Lazar added the comment: I can certainly do that. Although in addition to adding a keyword argument, we would also have to change the return signature to switch between modes like this:
if lineno is None: return caps else: return caps, lineno Overall I'm not a fan of this technique and would like to avoid it if possible. The problem is that we have to keep track of the current line between successive calls to readmailcapfile(). An alternative would be to go back to using lineno as a generator. This is close to what I had in the initial patch. lineno = itertools.count() caps = readmailcapfile(fp, lineno=lineno) caps = readmailcapfile(fp2, lineno=lineno) caps = readmailcapfile(fp3, lineno=lineno) ...etc Happy to hear any insights you have on this. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14977> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com