Ned Deily added the comment:
This is a documented behavior difference in itertools.imap:
If function is set to None, then imap() returns the arguments as a tuple. Like
map() but stops when the shortest iterable is exhausted instead of filling in
None for shorter iterables. The reason for the
New submission from Dingyuan Wang:
If a script uses tabs for indentation, tokenize.untokenize won't restore
original indentation correctly from the second line of the indentation level,
and thus breaks the file.
This affects all Python versions.
Test code:
python2 -c 'import sys, tokenize;
Ned Deily added the comment:
Also note that the behavior of map() in Python 3 has been changed to also stop
with the termination of the shortest iterator.
https://docs.python.org/3.4/whatsnew/3.0.html#views-and-iterators-instead-of-lists
--
___
Changes by Charles-François Natali cf.nat...@gmail.com:
--
keywords: +needs review
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24303
___
o1da added the comment:
Ok, thank you. I thought it trims whole sequence or nothing.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24445
___
Patrick Maupin added the comment:
(stuff about cPython)
No, I was curious about whether somebody maintained pure-Python fixes (e.g. to
the re parser and compiler). Those could be in a regular package that fixed
some corner cases such as the capture group you just applied a patch for.
...
Patrick Maupin added the comment:
Example
text = 'test1/1.jp2'
text.rstrip('.2jp')
'test1/1'
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24445
___
Patrick Maupin added the comment:
I think you misunderstand rstrip -- it works from the right, and checks to see
if the right-most character is in the string you have given it. As long as it
is, then it will remove the character and loop
--
nosy: +Patrick Maupin
New submission from o1da:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type help, copyright, credits or license for more information.
text = 'test1/1.jp2'
text.rstrip('.jp2')
'test1/1'
text = 'test1.jp2'
text.rstrip('.jp2')
'test1'
text = 'test1/2.jp2'
Martin Panter added the comment:
The 3.5 documentation of str.strip() was recently modified in Issue 24204 due
to this kind of misunderstanding. Perhaps other versions should be modified as
well, or the str.l/rstrip() methods, or the bytes() and bytearray() methods.
See also Issue 23560
R. David Murray added the comment:
It think the thing to do is to turn it into a test case for both the old and
the new parser, and the decide what we want the behavior to be.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Not having addClassCleanup means that my setUpClass method will have four
try/excepts in it, as will my tearDownClass (I have four fixtures I'm setting
up for the tests).
So, no, it isn't strictly needed, but it is prettier :). As Robert says,
though, it
Tal Einat added the comment:
Is this really needed? One can use try/except/raise, and since
addClassCleanup() would only be called from setUpClass(), I don't quite see the
utility of it.
--
nosy: +taleinat
___
Python tracker rep...@bugs.python.org
Tal Einat added the comment:
Confirmed on OSX 10.10. Here's my output:
running build
running build_ext
building 'cmath' extension
./slow-cc.py -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g
-fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement
-I./Include
Tal Einat added the comment:
I'm not convinced this would be worth the effort required to implement and
maintain it.
Can someone find examples from existing test suites where this would clearly be
useful? For example, a setUpClass() or setUpModule() function with multiple
try/finally
Nick Coghlan added the comment:
Regarding the idea of doing a typedef for the new coro type at the C level:
looking further at the way the new type integrates with the eval loop, it's
essential that they actually retain the exact same memory layout if we don't
want to rewrite a whole lot of
Tal Einat added the comment:
See the existing issue and discussion about this on the six library's issue
tracker (opened nearly a year ago):
https://bitbucket.org/gutworth/six/issue/94/introduce-sixround
--
nosy: +taleinat
___
Python tracker
Robert Collins added the comment:
It would be nice for symmetry. I mean, setUpClass isn't needed either, and we
have it ;).
however, we actually have two contexts this would be called from - setUpClass
and setUpModule; both share their internals. So we probably need a decoupled
cleanups
Serhiy Storchaka added the comment:
addCleanup() is helpful because it can be used in test methods.
addClassCleanup() and addModuleCleanup() can't be used in test methods, and
setUpClass() and setUpModule() are used less than setUp(), therefore the
benefit of these methods are less than of
Roundup Robot added the comment:
New changeset 4ba334ed3bb7 by Berker Peksag in branch '3.4':
Issue #24435: Use the devguide link instead of PEP 306 in Grammar/Grammar.
https://hg.python.org/cpython/rev/4ba334ed3bb7
New changeset 1622bc1af766 by Berker Peksag in branch '3.5':
Issue #24435: Use
Stefan Behnel added the comment:
I agree that a typedef is a good idea. It doesn't cost anything but gives
us more freedom for future changes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24400
Milan Oberkirch added the comment:
Is this still relevant? I just made a patch based on the suggestions discussed
and it does not change the behavior of the original bug report (but fixed the
bug regarding '' mentioned by tony_nelson). Maybe I'm missing something?
--
keywords:
New submission from Jaivish Kothari:
https://docs.python.org/2/library/threading.html#threading.Event.set
links missing for wait and clear .
set() is linked though.
Line:
An event object manages an internal flag that can be set to true with the set()
method and reset to false with the
Roundup Robot added the comment:
New changeset a985b6455fde by Berker Peksag in branch '2.7':
Issue #24443: Fix links for Event.clear() and Event.wait() methods.
https://hg.python.org/cpython/rev/a985b6455fde
--
nosy: +python-dev
___
Python tracker
New submission from py.user:
import argparse
parser = argparse.ArgumentParser()
_ = parser.add_argument('foo', choices=[], help='%(choices)s')
parser.print_help()
Traceback (most recent call last):
File stdin, line 1, in module
File
Berker Peksag added the comment:
Thanks for the report, Chris.
--
nosy: +berker.peksag
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24435
Steve Dower added the comment:
About the only possible solution here would be to special case ctypes to detect
msvcr90 as a parameter (later versions of the CRT don't need it) and also
whether another activation context already exists. We could also document the
need for a complete manifest
Changes by Charles-François Natali cf.nat...@gmail.com:
--
keywords: +needs review
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23992
___
Henrik Heimbuerger added the comment:
I can still reproduce this on the just released Windows 10 build 10130, after
python -m pip uninstall pip and then python get-pip.py (which recreated the
pip.exe binary for pip 7.0.3).
Is there anything else I need to do to make this work now?
--
Serhiy Storchaka added the comment:
This is a reason to file a feature request to regex. In 3.3 re was slower than
regex in some cases:
$ ./python -m timeit -s import re; p = re.compile('\n\r'); s = ('a'*100 +
'\n\r')*1000 -- p.split(s)
Python 3.3 re : 1000 loops, best of 3: 952 usec per
Jaivish Kothari added the comment:
My Pleasure sir :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24443
___
___
Python-bugs-list mailing list
Berker Peksag added the comment:
Thanks for the reviews. Here is an updated patch.
--
Added file: http://bugs.python.org/file39703/issue23275_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23275
Serhiy Storchaka added the comment:
1) Do you know if anybody maintains a patched version of the Python code
anywhere? I could put a package up on github/PyPI, if not.
Sorry, perhaps I misunderstood you. There are unofficial mirrors of CPython on
Bitbucket [1] and GitHub [2]. They don't
Tal Einat added the comment:
Ahh, that makes sense. Sounds good to me!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24412
___
___
Steve Dower added the comment:
i'm not following why it's a special case, or why later versions wouldn't
have the same problem?
The Microsoft C Runtime 9.0 required an activation context to allow multiple
versions to load side by side. This turned out to be more trouble than it was
worth,
35 matches
Mail list logo