Serhiy Storchaka added the comment:
LGTM.
The 2.x docs were fixed in c9bf6e70308e, but this change was lost during
merging to 3.x in 3d866579117d.
--
components: +Unicode
nosy: +ezio.melotti, haypo, serhiy.storchaka
stage: - commit review
versions: +Python 3.4, Python 3.5
Terry J. Reedy added the comment:
Please attach the file to this issue, using the [Browse] button.
--
nosy: +serhiy.storchaka, terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24587
Terry J. Reedy added the comment:
To modify what I said, Idle only auto-expands literal tabs entered into an
editor window with the Tab key. When one is doing such entry, all key
sequences are subject to interception, so this is nothing special.
Tabs chars put in a string with '\t' or '\x09'
Terry J. Reedy added the comment:
To me, this cries out for a public context manager ( believe there is a public
one in test.support, or something), so one can write
with stdout(ob):
print(stuff)
I am not sure, though, where the C.M.s should live.
--
nosy: +terry.reedy
Terry J. Reedy added the comment:
I closed #24572 as a duplicate of this. It is the same issue except for
printing \r instead of \b. These issues are not about responses to keyboard
actions when entering text into an Idle editor window. During entry, just
about any
Chris Angelico added the comment:
Interestingly, the 2.7 docs have this correct already.
https://docs.python.org/2.7/reference/expressions.html#id23
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24610
New submission from Chris Angelico:
https://docs.python.org/3/reference/expressions.html#id18
The string \u0327\u0043 does not normalize to the same string as \u00C7, as
combining characters are supposed to _follow_ the base character. (Some
consoles may happen to display them the same way,
Serhiy Storchaka added the comment:
Control characters are named control characters because they are control the
output device. Different devices have different capabilities and reacts
different on the same codes. Windows console, different sorts of Linux
terminals and Tk text widget are
New submission from candide:
Expressions such as
a + not b
a * not b
+ not b
- not b
raise a SyntaxError, for instance :
0 + not 0
File stdin, line 1
0 + not 0
^
SyntaxError: invalid syntax
- not 0
File stdin, line 1
- not 0
^
SyntaxError: invalid syntax
if
Steven D'Aprano added the comment:
On Sat, Jul 11, 2015 at 03:23:53PM +, candide wrote:
New submission from candide:
Expressions such as
a + not b
a * not b
+ not b
- not b
raise a SyntaxError, for instance :
0 + not 0
File stdin, line 1
0 + not 0
^
Serhiy Storchaka added the comment:
not not 0 is compiled successful, while + not 0, - not 0, and ~ not 0
are rejected.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24612
Julian Taylor added the comment:
ok I ran it again, but note the machine was under use the full time so the
results are likely have no meaning.
python perf.py -r -b default /tmp/normal/bin/python3 /tmp/opt/bin/python3
Min: 0.399279 - 0.376527: 1.06x faster
Avg: 0.410819 - 0.383315: 1.07x
New submission from Ron Barak:
I wanted to add Python 2.7 to Unix.
I downloaded the sources to the VirtualBox on which the Unix is installed and
run
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
without problems.
However, when I try to
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
nosy: +serhiy.storchaka
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24611
___
R. David Murray added the comment:
unixware is not a platform we support (we don't have a buildbot for it). If
you can figure out how to fix this and it isn't disruptive to the codebase, you
can submit a patch.
--
nosy: +r.david.murray
___
Python
Eugene K. added the comment:
File attached
--
Added file: http://bugs.python.org/file39895/bug.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24587
___
Stefan Behnel added the comment:
Hmm, right. I see your point and also the analogy with yield. I could live
with (maybe) giving it a better error message suggesting to use parentheses for
clarity and otherwise keeping it a SyntaxError.
--
___
Serhiy Storchaka added the comment:
I think this simple patch should fix the issue.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file39896/issue24611.patch
___
Python tracker rep...@bugs.python.org
Stefan Behnel added the comment:
It looks like perfectly valid syntax to me and I cannot see why it should be
semantically rejected. I disagree that it shouldn't be changed. I think it's a
(minor) bug that should eventually get fixed.
--
nosy: +scoder
Changes by Petr Viktorin encu...@gmail.com:
--
nosy: +encukou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19713
___
___
Python-bugs-list mailing
Matthew Barnett added the comment:
not has a lower priority than unary -; this:
not a b
is parsed as:
not (a b)
How would you parse:
0 + not 0 + 0
?
Would it be parsed as:
0 + not (0 + 0)
?
Similar remarks could apply to yield:
0 + yield 0
which is also a syntax
John Leitch added the comment:
Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file39900/arraymodule.c.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24613
___
New submission from John Leitch:
The Python array.fromstring() method suffers from a use after free caused by
unsafe realloc use. The issue is triggered when an array is concatenated to
itself via fromstring() call:
static PyObject *
array_fromstring(arrayobject *self, PyObject *args)
{
Tim Peters added the comment:
[Raymond]
I can't say that I feel good about making everyone pay
a price for a problem that almost no one ever has.
As far as I know, nobody has ever had the problem. But if we know a bug
exists, I think it's at best highly dubious to wait for a poor user to
Martin Panter added the comment:
Joe: Have you seen the comments on the code review? See the Review link at the
top of the bug thread, or maybe check your spam.
--
nosy: +vadmium
stage: - patch review
___
Python tracker rep...@bugs.python.org
Joe Jevnik added the comment:
Ah, I hadn't seen that, I will address those now, sorry about that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
___
Martin Panter added the comment:
“run ``import idlelib; idlelib.run`` within a try-except statement”: It might
be nice to say what exceptions are expected. My guess is ImportError if Idle or
TK is not available, or AttributeError if it is but Idle is not running.
“Tk handling of ascii control
Terry J. Reedy added the comment:
The issue is the interaction between stacking and focus. I am pretty sure that
this is not a Python bug and that this issue should be closed. I suspect that
the behavior is not even a tk bug, but simply how Windows' graphics system work.
In any case, the
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
components: +Extension Modules
nosy: +serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24613
Raymond Hettinger added the comment:
See the attached timings. The performance hit isn't bad and the code's beauty
isn't marred terribly. Yes, we'll fix it, but no I don't have to feel good
about it ;-)
--
___
Python tracker
Terry J. Reedy added the comment:
I was thinking AttributeError, as mentioned in the previous sentence. But you
are correct that ImportError is possible too. Maybe I should just give the
code.
try:
import idlelib
idlelib.run
running_idle = True
except (ImportError,
Joe Jevnik added the comment:
updating with the slots change
This also adds a ton of test cases
--
Added file: http://bugs.python.org/file39902/operator_subscript_pyonly.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
For shuffle I would write if j i.
I think 3.x should be fixed as well as 2.7. And I like Tim's suggestion about
import-time patching.
--
___
Python tracker rep...@bugs.python.org
Eugene K. added the comment:
It may not be a pure Python bug, but it's definitely at least a tk bug (which
makes it a Python bug as long as tk is the canonical UI package in Python.)
Workarounds are nice, but a workaround fixes my specific problem here and now,
while leaving unknown numbers
Raymond Hettinger added the comment:
[Antoine]
If that would give a different sequence of random numbers,
I'm not sure that's acceptable in a bugfix release. Raymond
can shed a light.
You're right. It is not acceptable to give a different sequence of random
numbers within a bugfix
Roundup Robot added the comment:
New changeset 1cae77f873af by Benjamin Peterson in branch '3.4':
fix normalization example (closes #24610)
https://hg.python.org/cpython/rev/1cae77f873af
New changeset 0127b0cad5ec by Benjamin Peterson in branch '3.5':
merge 3.4 (#24610)
Joe Jevnik added the comment:
ping: is there anything blocking this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24567
___
___
Raymond Hettinger added the comment:
FWIW, here are some variants (with differing degrees of brevity, clarity, and
performance):
def choice(self, seq):
Choose a random element from a non-empty sequence.
n = len(seq)
i = int(self.random() * n)
if i == n:
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file39897/choice_timings.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24567
___
Martin Panter added the comment:
I wouldn’t say TK ignores carriage returns, though I agree it would be better
if Idle stripped them out. Currently I get a glyph displayed for them,
similarly to \b. They wouldn’t copy to my clipboard, so I fudged them after
pasting here:
_ =
Serhiy Storchaka added the comment:
The implementation itself LGTM (nice use of decorator). New feature should be
documented. Needed changes in Doc/library/operator.rst and Doc/whatsnew/3.6.rst
and the docstring for the subscript class. 'subscript' should be added to
__all__.
--
42 matches
Mail list logo