[issue1708652] Exact matching

2010-09-17 Thread Tom Lynn
Tom Lynn added the comment: I don't know whether it should stand, I'm somewhere around 0 on it myself. So I guess that means it shouldn't, since it's easier to add features than remove them. The problem is that once you're aware of the need for it you need it less.

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: I'm still unsure. I think this confusion does cause bugs in real-world code. Perhaps more prominence for \A and \Z in the docs? There's already a section comparing regexps starting '^' with match under "Matching vs Searching".

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: Actually, looking at the second part of the docs for $ (on "foo.$") makes me think the main motivating case here may be a bug in re.match:: >>> re.match('foo$', 'foo\n\n') >>> re.match('foo$', 

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: Oh dear, I'm wrong on two fronts (I wish Roundup had post editing). a) foo$ doesn't match the 'foo' part of 'foo\nbar' as I stated above, but does match the 'foo' part of 'foo\n'. b) Obviously shortening an inpu

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: (Sorry to comment on a closed issue, it was closed as I was writing this.) It's not that I'm not convinced of the need, just not of the solution. I still think that there are problems here: a) forgetting any \Z or $ terminator to .match() is easy, b) $

[issue1859] textwrap doesn't linebreak on "\n"

2010-11-23 Thread Tom Lynn
Tom Lynn added the comment: I've also been attempting to look into this and came up with an almost identical patch, which is promising: https://bitbucket.org/tlynn/issue1859/diff/textwrap.py?diff2=041c9deb90a2&diff1=f2c093077fbf I missed the wordsep_simple_re though. Testing it is

[issue1708652] Exact matching

2008-10-13 Thread Tom Lynn
Tom Lynn <[EMAIL PROTECTED]> added the comment: Yes, that's right. The binary aspect of it was something of a red herring, I'm afraid, although I still think that (or parsing in general) is an important use case. The prime motivation it that it's easy to either forg

[issue1631394] sre module has misleading docs

2008-01-25 Thread Tom Lynn
Tom Lynn added the comment: Thanks for fixing this. I now also note that (?<=...), (?http://bugs.python.org/file9284/undoc-patch.txt _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1631394] sre module has misleading docs

2008-01-26 Thread Tom Lynn
Tom Lynn added the comment: Nice changes to the wording. (For the record: it's r60316 in fact.) _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1631394> _ _

[issue2670] urllib2 build_opener() fails if two handlers use the same default base class

2008-04-22 Thread Tom Lynn
New submission from Tom Lynn <[EMAIL PROTECTED]>: urllib2.py:424 (Py 2.4) or urllib2.py:443 (Py 2.5) in build_opener():: skip = [] for klass in default_classes: for check in handlers: if inspect.isclass(check): if issubclass

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : This file fails when run with doctest.testfile:: >>> print __name__ __builtin__ >>> print globals()['__name__'] # fails with KeyError: __name__ __builtin__ "__builtin__" is probably not a good value, but more impor

[issue5022] doctest should allow running tests with "python -m doctest"

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : It would be good to be able to do something like:: $ python -m doctest foo.py $ python -m doctest --text foo.txt bar.txt (or preferably some command line options design which could handle both .py and .txt files). -- components: Library (Lib

[issue5079] time.ctime docs refer to "time tuple" for default

2009-01-27 Thread Tom Lynn
New submission from Tom Lynn : The docs for time.ctime() (quoted below) seem to have been copied from time.asctime(). They refer to a time tuple and localtime(), where they should refer to seconds and time(). Current docs:: ctime(seconds) -> string Convert a time in seco

[issue5079] time.ctime docs refer to "time tuple" for default

2009-01-27 Thread Tom Lynn
Changes by Tom Lynn : -- components: +Library (Lib) type: -> feature request versions: +Python 2.5, Python 3.0 ___ Python tracker <http://bugs.python.org/iss

[issue1079] decode_header does not follow RFC 2047

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: The only difference between the two regexps is that the email/header.py version looks for:: (?=[ \t]|$) # whitespace or the end of the string at the end (with re.MULTILINE, so $ also matches '\n'). To expand on "There is nothing about th

[issue4958] email/header.py ecre regular expression issue

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Duplicates issue1047. -- nosy: +tlynn ___ Python tracker <http://bugs.python.org/issue4958> ___ ___ Python-bugs-list mailin

[issue4958] email/header.py ecre regular expression issue

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Oops, duplicates issue 1079 even. ___ Python tracker <http://bugs.python.org/issue4958> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Duplicates issue1079. -- nosy: +tlynn ___ Python tracker <http://bugs.python.org/issue4491> ___ ___ Python-bugs-list mailin

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-03 Thread Tom Lynn
New submission from Tom Lynn: The tarfile module silently truncates the list of entries when reading a tar file if it sees an entry with a uid/gid field containing only spaces/NULs. I got such a tarball from Java Maven/plexus-archiver. I don't know whether they write such f

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-04 Thread Tom Lynn
Tom Lynn added the comment: I think the default has to be 0 for consistency with how other empty numeric fields are handled. In theory spaces and NULs are supposed to be equivalent terminators in numeric fields, but I've just noticed that plexus-archiver is also using leading spaces r

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: See attached bad.tar. $ less bad.tar | cat drwxr-xr-x 0/0 0 2012-09-05 20:04 foo/ -rw-rw-r-- uname/gname 0 2012-09-05 20:04 foo/a $ python -c 'import tarfile; print(tarfile.open("bad.tar").getnames())' ['foo'] $ py

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: patch.py attached - what I'm using as a workaround at the moment. -- Added file: http://bugs.python.org/file27130/patch.py ___ Python tracker <http://bugs.python.org/is

[issue19560] PEP 8 operator precedence across parens

2013-11-12 Thread Tom Lynn
New submission from Tom Lynn: PEP 8 currently has:: Yes:: ... c = (a+b) * (a-b) No:: ... c = (a + b) * (a - b) That looks wrong to me -- surely the parens are a sufficient precedence hint, and don't need further squashing inside? This will be worse with an

[issue19560] PEP 8 operator precedence across parens

2013-11-12 Thread Tom Lynn
Tom Lynn added the comment: FWIW, this pair of examples differs from the others in this section as they were both explicitly okayed in the first version of PEP 8 <http://hg.python.org/peps/rev/4c31c25bdc03?revcount=120>:: - Use your better judgment for the insertion of spaces

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-01-15 Thread Tom Lynn
Tom Lynn added the comment: The secondary issue, which the patch doesn't address, is that TarFile.next() seems unpythonic; it treats any {Invalid,Empty,Truncated}HeaderError after offset 0 as EOF rather than propagating the exception. It looks deliberate, but I'm not sure why i

[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-10-24 Thread Tom Lynn
Changes by Tom Lynn : -- nosy: +tlynn ___ Python tracker <http://bugs.python.org/issue2746> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1859] textwrap doesn't linebreak on "\n"

2009-11-19 Thread Tom Lynn
Tom Lynn added the comment: This bug should be re-opened, since there is definitely a bug here. I think the patch was incorrectly rejected. If I can expand palfrey's example: from textwrap import * T = TextWrapper(replace_whitespace=False, width=75) text = '''\ a aaa

[issue15858] tarfile missing entries due to omitted uid/gid fields

2015-12-08 Thread Tom Lynn
Tom Lynn added the comment: I think issue24514 (fixed in Py2.7.11) is a duplicate of this issue. -- ___ Python tracker <http://bugs.python.org/issue15858> ___ ___