Ezio Melotti ezio.melo...@gmail.com added the comment:
In the examples you used byte strings for Py2 and Unicode strings for
Py3. On Py3 the same example with byte strings gives an error similar to
the one raised by Py2:
bfoo.startswith([bfo])
Traceback (most recent call last):
File stdin,
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - christian.heimes
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6744
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6738
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +krisvale
priority: - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6701
___
___
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6738
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
Confirmed on Python3.1 too.
--
nosy: +ezio.melotti
priority: - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6662
___
New submission from benlbroussard benlbrouss...@gmail.com:
Negative one squared should be one, but is negative one sometimes.
pow(-1, 2) = 1
-1 ** 2 = -1
-1 ^ 2 = -1
The ** and ^ operators aren't working like expected, and the pow()
documentation is incorrect since it says The two-argument
Mark Dickinson dicki...@gmail.com added the comment:
This is not a bug:
-1 ** 2 is parsed as -(1 ** 2), not (-1) ** 2. Take a look at:
http://docs.python.org/reference/expressions.html#the-power-operator
In -1 ^ 2, ^ is the bitwise exclusive-or operator, not the power operator.
pow(x, y) is
Mark Dickinson dicki...@gmail.com added the comment:
By the way, I get -1 ^ 2 == -3, not -1:
-1 ^ 2
-3
If you're getting -1 instead, then that *is* a bug! Are you?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6781
New submission from victor bitto...@uwp.edu:
I can't tell if this is feature or a bug but either way this
behavior struck me as strange.
def func():
x = 5
def inc():
temp = x + 1 # when inc() is execute, this line fails
x = temp
return x
return inc
i = func()
i() # will raise
R. David Murray rdmur...@bitdance.com added the comment:
It's feature.
In python 3 you can use the 'nonlocal' keyword to access the variable in
the outer scope for assignment.
--
nosy: +r.david.murray
priority: - normal
resolution: - invalid
stage: - committed/rejected
Changes by Benjamin Peterson benja...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6782
___
___
Cherniavsky Beni c...@users.sf.net added the comment:
Nice. 2 questions:
1. Why not change getch() to always use get_wch()?
2. I think you also want fix getkey() / introduce get_wkey().
--
nosy: +cben
___
Python tracker rep...@bugs.python.org
PJ McNerney pjmcner...@gmail.com added the comment:
Has the ability to set the memory allocator been added to Python 2.7/3.1?
Thanks,
PJ
--
nosy: +pjmcnerney
versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0
___
Python tracker
New submission from Yuv Gre ubershme...@gmail.com:
In javascript and java each number has a toString method which allows
for easy string representation in different bases. If the function int(x[,
base]) exists as a builtin, the inverse should at least be
somewhere in the standard library.
Mark Dickinson dicki...@gmail.com added the comment:
This seems like the sort of idea that should be floated on the python-
ideas mailing list or comp.lang.python first, both to find out what
support there is and to pin down precise semantics.
We already have int to string conversions in bases
Mark Dickinson dicki...@gmail.com added the comment:
See http://mail.python.org/pipermail/python-dev/2006-January/059789.html
for a previous related discussion.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6783
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1068268
___
___
Sophia K. Cheng sophia.ch...@gmail.com added the comment:
Thanks!! This worked perfectly! Finally got around to trying this out
today.
Sincerely,
Sophia
On 3/20/09 4:26 AM, Timothy Zhang rep...@bugs.python.org wrote:
Timothy Zhang z...@live.cn added the comment:
I meet the same
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6783
___
___
Python-bugs-list
Ryan Leslie ryle...@gmail.com added the comment:
Hi Art,
Thanks for working on this. I've taken a look at the patch.
The fix to read_test looks correct. Of course, I would consider a more
descriptive variable name than 'b'.
The changes to read() are an improvement, but I think we need to be
21 matches
Mail list logo