New submission from Sven Marnach :
The sidebar on http://docs.python.org/release/3.1.3/ names 3.2 as the
development version of Python, while the link points to 3.3. The sidebar on
http://docs.python.org/py3k/ links to 3.1 as the "stable version" -- obviously
a relict from the tim
New submission from Sven Marnach :
The documentation of PyNumber_ToBase() [1] states
When base is not 2, 8, 10, or 16, the format is 'x#num'
where x is the base.
In reality, the function does not accept any bases different
from 2, 8, 10, or 16, as can be seen in the sour
New submission from Sven Marnach :
If exactly one of the two tuple allocations in [1] fails, the tuple that is
successfully allocated won't be freed. (This probably never happened. Are you
interested in this kind of bug report anyway?)
[1]: http://hg.python.org/cpython/file/f6b3ad3
New submission from Sven Marnach :
As discussed on python-ideas [1], range objects should expose their start, stop
and step values as read-only data attributes. I've attached a patch to this
end.
I'll open a separate issue for range comparison.
[1]: http://mail.python.org/piperm
New submission from Sven Marnach :
It seems some sort of consensus on how to compare range objects has emerged
from the python-ideas discussion on comparison of range objects [1].
The attached patch defines '==' and '!=' for range object equality based on the
sequence of v
Sven Marnach added the comment:
Thanks, Éric. Added new version of the patch. (Could I also edit the old one?)
--
Added file: http://bugs.python.org/file23427/range-members.patch
___
Python tracker
<http://bugs.python.org/issue13
Sven Marnach added the comment:
Mark, thanks for your comments. Here's a new version of the patch, I answer on
Rietveld.
--
Added file: http://bugs.python.org/file23429/range-compare-v2.patch
___
Python tracker
<http://bugs.python.org/is
Sven Marnach added the comment:
Mark, thanks again for your comments. (I never looked at the Python source
code before, so tey are highly appreciated.) I uploaded a new version of the
patch hopefully.
--
Added file: http://bugs.python.org/file23441/range-compare-v3.patch
Sven Marnach added the comment:
Thanks for the updates, Mark. I was just about to look into this again. The
changes are fine with me.
--
___
Python tracker
<http://bugs.python.org/issue13
Sven Marnach added the comment:
Victor Stinner wrote:
> If would be nice to have a PyLong_CompareLong() function.
In most cases, global variables Py_Zero and Py_One would be enough to simplify
this kind of code.
--
___
Python tracker
&l
New submission from Sven Marnach :
The execfile fixer of the 2to3 script replaces the 2.x code
execfile("a.py")
by
exec(compile(open("a.py").read(), "a.py", 'exec'))
The new code does not explicitly close the file. This is not usually a pro
Sven Marnach added the comment:
@Petri: Yes, that's what the BaseFix.new_name() method is for.
@Antoine: I thought about this, though I don't think it is very common to call
execfile() as part of an expression. The whole statement containing the
function call would need to
Sven Marnach added the comment:
Getting the general case right seems a bit too difficult. Examples like
[execfile(n) for n in names if condition(n)]
execfile(execfile(n1) or n2)
try: 1 / 0
except execfile(n) or ZeroDivisionError: pass
would require rather complex
Sven Marnach added the comment:
There is actually a second thread on python-ideas on a very similar topic, see
http://mail.python.org/pipermail/python-ideas/2011-December/013021.html
The two main advantages of the proposed CleanupManager over try/finally blocks
are
1. You can add a
Sven Marnach added the comment:
I think that the fact that Nick got the code to close multiple files wrong
underlines that it is difficult to get right currently. Nick's code
try:
files = [open(fname) for fname in names]
# ...
finally:
for f in
Sven Marnach added the comment:
The behaviour discussed in this thread does not seem to be reflected in
Python's documentation. The documentation of __eq__() [1] doesn't mention that
objects should compare equal to themselves.
[1]: http://docs.python.org/dev/reference/datamodel.h
New submission from Sven Marnach :
The function shlex.quotes() [1] does not yet exist in Python 3.2 [2], so it
should be marked "New in version 3.3." in the docs.
I double-checked that it really does not yet exist in 3.2 and is not only
missing from the 3.2 documentation.
New submission from Sven Marnach :
The documentation of the 'signal' module states on the one hand
[T]he main thread will be the only one to receive signals (this is
enforced by the Python signal module, even if the underlying thread
implementation supports sending
Sven Marnach added the comment:
The documentation has been left in a confusing state by this patch -- at least
confusing to me. I've created issue14456 with further details.
--
nosy: +smarnach
___
Python tracker
<http://bugs.python.org/i
Sven Marnach added the comment:
For reference: the functions 'pthread_kill()' etc. were intrduced in issue8407.
--
___
Python tracker
<http://bugs.python.o
Sven Marnach added the comment:
Thanks, Antoine! It's perfectly clear now, and the newly introduces headlines
are a definite improvement.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Sven Marnach :
As has been pointed out before on python-dev [1], the mandatory version of
'__future__.absolute_import' does not match reality. In Python 2.7, absolute
imports are not the default.
[1]: http://article.gmane.org/gmane.comp.python.devel/125446
Th
Sven Marnach added the comment:
The current behaviour of islice() seems inconsistent with the rest of Python.
All other functions taking start, stop and step arguments like slice(), range()
and itertools.count() do accept integer-like objects. The code given as
"roughly equivalent&qu
Sven Marnach added the comment:
The semantics of "associated application" change considerably from operating
system to operating system. As an example, ``os.startfile("a.py")`` will
usually run `a.py` in the Python interpreter, while ``xdg-open a.py`` it will
usually ope
24 matches
Mail list logo