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.
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".
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$',
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
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) $
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
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
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/
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>
_
_
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
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
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
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
Changes by Tom Lynn :
--
components: +Library (Lib)
type: -> feature request
versions: +Python 2.5, Python 3.0
___
Python tracker
<http://bugs.python.org/iss
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
Tom Lynn added the comment:
Duplicates issue1047.
--
nosy: +tlynn
___
Python tracker
<http://bugs.python.org/issue4958>
___
___
Python-bugs-list mailin
Tom Lynn added the comment:
Oops, duplicates issue 1079 even.
___
Python tracker
<http://bugs.python.org/issue4958>
___
___
Python-bugs-list mailing list
Unsubscribe:
Tom Lynn added the comment:
Duplicates issue1079.
--
nosy: +tlynn
___
Python tracker
<http://bugs.python.org/issue4491>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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
Changes by Tom Lynn :
--
nosy: +tlynn
___
Python tracker
<http://bugs.python.org/issue2746>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
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
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>
___
___
28 matches
Mail list logo