Author terry.reedy
Recipients barry, durin42, gward, ncoghlan, pitrou, r.david.murray, terry.reedy
Date 2013-03-19.02:07:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363658859.24.0.677171032938.issue17445@psf.upfronthosting.co.za>
In-reply-to
Content
I was about to suggested a simplified version of the original one-function version but the new one is better. One change: name = lambda... is discouraged in the stdlib (Guido, pydev, a few years ago). Def statements require only 3 more chars and produce properly named objects for tracebacks.
  encode = lambda s: s
  def encode(s): return s

Under current rules, this is a 3.4 enhancement. For the context_diff and unified_diff doc change:
-  Compare a and b (lists of strings);
+  Compare string or bytes sequences a and b;   # (or)
+  Compare a and b (both sequences of strings or sequences of bytes);

Neither entry says anything at present about the type of from/tofile. Based on your patch, the following could go after the first sentence:
+"Arguments *fromfile* and *tofile* are normally strings but may be bytes if the items of *a* and *b* are."
History
Date User Action Args
2013-03-19 02:07:39terry.reedysetrecipients: + terry.reedy, barry, gward, ncoghlan, pitrou, durin42, r.david.murray
2013-03-19 02:07:39terry.reedysetmessageid: <1363658859.24.0.677171032938.issue17445@psf.upfronthosting.co.za>
2013-03-19 02:07:39terry.reedylinkissue17445 messages
2013-03-19 02:07:38terry.reedycreate