Message184580
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." |
|
Date |
User |
Action |
Args |
2013-03-19 02:07:39 | terry.reedy | set | recipients:
+ terry.reedy, barry, gward, ncoghlan, pitrou, durin42, r.david.murray |
2013-03-19 02:07:39 | terry.reedy | set | messageid: <1363658859.24.0.677171032938.issue17445@psf.upfronthosting.co.za> |
2013-03-19 02:07:39 | terry.reedy | link | issue17445 messages |
2013-03-19 02:07:38 | terry.reedy | create | |
|