Mark Dickinson added the comment:
Certainly TypeError seems inappropriate here, and using ValueError for
conversions from NaN sounds good to me.
I'm not a big fan of the OverflowError for converting infinities to an integer:
nothing's actually overflowed here. I think that should have been
Changes by Mark Dickinson dicki...@gmail.com:
--
title: Exceptions raised by Fraction() from those raised by int() - Exceptions
raised by Fraction() different from those raised by int()
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
This issue affects only 3.3+ (see links above).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16157
___
___
Mark Dickinson added the comment:
The from_decimal method should be changed as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16469
___
Serhiy Storchaka added the comment:
As I understand, the new dict created on every call of function with keyword
arguments. This slow down every such call about 0.1 µsec. This is about
10% of int('42', base=16). In the sum, some programs can slow down to a few
percents.
Direct comparison
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Chris Jerdonek added the comment:
To simplify the discussion and for issue resolution purposes, I propose that
the discussion about large choices containers be divided into separate
discussions for (1) changes that should be applied to all maintenance releases
(i.e. bug fix changes), and (2)
Chris Jerdonek added the comment:
(1) changes that should be applied to all maintenance releases (i.e. bug fix
changes)
This should instead read, (1) changes that should be applied to all
maintenance releases (e.g. bug fix and/or documentation changes).
--
Yongzhi Pan added the comment:
I think metal means that the different ways set is repr'd in 2.7 and 3.
In 2.7:
In [9]: a = {x for x in 'abracadabra' if x not in 'abc'}
In [10]: repr(a)
Out[10]: set(['r', 'd'])
In 3.2:
In [6]: a = {x for x in 'abracadabra' if x not in 'abc'}
In [7]: repr(a)
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16469
___
___
Chris Jerdonek added the comment:
The code could simply use the str or repr of the choice object
It seems to me that this would result in less user-friendly behavior in many
cases. It would also require the end-user to understand Python (e.g. xrange
and dictionaries), which I don't think
Martin v. Löwis added the comment:
I talked to a bunch of people (n=7) here at the company where I also
give Python courses from time to time. I asked them two questions:
1. Is this behavior of FD what you would expect?
2. Given the current behavior of FD, what use cases do you see?
The
Martin v. Löwis added the comment:
Zitat von Tom Pohl rep...@bugs.python.org:
This is not: 1 // 0.1 = 9.0 because math.floor(1/0.1) is able to
come up with the result that is expected from an operator called
floor division.
You apparently assume that it is possible to give a definition
Mark Dickinson added the comment:
I believe that definining x//y as math.floor(x/y) is also confusing
in other cases (without being able to construct such cases right away).
In addition, defining x//y as math.floor(x / y) would break its connection with
%: a key invariant is that
(x //
Tom Pohl added the comment:
Mark, thanks for explaining the connection of // and %. Finally, I can see why
somebody would want to stick to the current behavior of FD.
It renders FD useless for all of my use cases, but there are simple
alternatives.
Thanks for your time,
Tom
--
New submission from Chris Jerdonek:
This issue is to upgrade Python's Sphinx from version 1.0 to 1.1.
I don't already see an issue for this, and I'm not sure what upgrading entails.
Personally, I'm interested in the enhanced indexing capabilities, e.g. the
see and seealso entry types, as well
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16469
___
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +eric.araujo, ezio.melotti, georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16471
___
Antoine Pitrou added the comment:
As I understand, the new dict created on every call of function with
keyword arguments. This slow down every such call about 0.1 µsec.
This is about 10% of int('42', base=16).
Ok, but `int('42', base=16)` is about the fastest function call with
keyword
Roundup Robot added the comment:
New changeset afb476dc202f by Vinay Sajip in branch '3.3':
Issue #16378: Updated docstrings to reflect the defaults present in the code.
http://hg.python.org/cpython/rev/afb476dc202f
New changeset 6f0e49ed0589 by Vinay Sajip in branch 'default':
Closes #16378:
Serhiy Storchaka added the comment:
Ok, but `int('42', base=16)` is about the fastest function call with
keyword arguments one can think about :-)
Not as fast as a call without keywords, `int('42', 16)`. :-( But this is a
different issue.
--
___
R. David Murray added the comment:
I agree with Chris that using the repr in the general case would be a
regression in usability for the end user (and certainly not suitable for a
maintenance release).
Here is some brainstorming:
We could special case this via duck typing. If the object
Te-jé Rodgers added the comment:
Disregard the last...error on my part (so embarrassing!)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8400
___
Te-jé Rodgers added the comment:
It gets worse. Even though find_module works with the path separator,
load_module fails.
zi.find_module(lib\\ui)
zipimporter object dist/Test_Editor-1.0-py3.2.zip
zi.load_module(lib\\ui)
Traceback (most recent call last):
File stdin, line 1, in module
Serhiy Storchaka added the comment:
Here is a really simple patch. It speed up to 1.9x an empty dict creation
(still 1.6x slower than 3.2). Make your measurements of real-world programs.
--
keywords: +patch
stage: - patch review
Added file:
Václav Šmilauer added the comment:
Martin, I know it is not a proper fix. OTOH, Python is not the only project
which recommends its header be included as first.
I don't know if it is an issue for Python 3.x; will try to test that. This bug,
though, is clearly reported about Python 2.7, which
New submission from Václav Šmilauer:
Compiling an extension with --compiler=mingw32 with official python 2.7.3
distribution on Windows (64bit) leads to unusable result - crash on module load
(invalid access to memory).
The reasons is that Lib/distutils/cygwincompiler.py#l62 links the
Changes by Ralf Schmitt python-b...@systemexit.de:
--
nosy: +schmir
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16472
___
___
Python-bugs-list
Martin v. Löwis added the comment:
The description of OverflowError is that is is raised when the result of an
arithmetic operation is too large to be represented, so it doesn't actually
need to overflow. Still, I see that ∞ actually isn't too large to be
represented (and the documentation
Changes by Tim Golden m...@timgolden.me.uk:
--
nosy: +gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16458
___
___
Python-bugs-list
Tim Golden added the comment:
On 13/11/2012 20:57, Karthk Rajagopalan wrote:
I added test case using perl and python since it was easy to
reproduce using perl socket module and show the issue happening with
python's subprocess.py. There is definitely an action required in
subprocess.py to
Karthk Rajagopalan added the comment:
Hi Tim,
Thanks for your reply.
Yes, DuplicateHandle(..) seem to fail if the handle is to a socket under XP
SP3.
Can you point me to the guidelines about submitting patch so I can merge my
change in main branch and upload it?
We build python from
Tim Golden added the comment:
Start here: http://docs.python.org/devguide/
In particular: http://docs.python.org/devguide/patch.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16458
Chris Jerdonek added the comment:
For the record, choices types implementing only __contains__ never worked in
any cases. (I should have said ArgumentParser.add_argument() raises a
ValueError in the above.)
So I wonder if we should classify this as an enhancement and simply document
the
Chris Jerdonek added the comment:
Martin, can you confirm that PyPI's behavior is as described in the patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16400
___
Roundup Robot added the comment:
New changeset 399e59ad0a70 by Mark Dickinson in branch 'default':
Issue #16290: __complex__ must now always return an instance of complex.
http://hg.python.org/cpython/rev/399e59ad0a70
--
nosy: +python-dev
___
Python
Changes by Mark Dickinson dicki...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16290
___
Chris Jerdonek added the comment:
For maintenance releases, I think I would favor abbreviating the list only if
it is lossless (e.g. for xrange objects). I think I would also be okay with
abbreviating for arbitrary xranges -- in particular for arbitrary steps. For
example, for xrange(0, 50,
Martin v. Löwis added the comment:
+1, that's all correct.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16400
___
___
Python-bugs-list mailing
Case Van Horsen added the comment:
Do we also want to change int(infinity) to return ValueError? I think
consistent behavior between int() and Fraction() is valuable.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16469
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16465
___
___
Python-bugs-list mailing list
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +bethard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16468
___
___
Python-bugs-list mailing
Brett Cannon added the comment:
Committed in dac396a730e4
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12907
Terry J. Reedy added the comment:
I agree that my extreme, strawman-ish, proposal, was, well, too extreme. Here
is a more realistic proposal similar to David's.
if isinstance(choices, range) and len(choices) 50:
choice_txt = range_rep(choices) # details to be determined
try:
choice_txt =
Jesús Cea Avión added the comment:
Antoine, I would consider this a performance regression to solve for 3.3.1.
Small dictionary creation is everywhere in CPython.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16465
Terry J. Reedy added the comment:
If the assumption of iterability is in more than just the help and error
messages, then I can see the point of calling this an enhancement. I suspect
that now, if a custom subset of ints or strings is the actual domain, people
just skip choices and add custom
Terry J. Reedy added the comment:
I see that in #16468, Chris proposes that existing versions should let the
TypeError propagate, possibly with an improved error message, and call the use
of repr for non-iterables a new feature (partly on the basis that more fixes
than this are needed to use
Antoine Pitrou added the comment:
Antoine, I would consider this a performance regression to solve for
3.3.1. Small dictionary creation is everywhere in CPython.
Again, feel free to provide real-world benchmark numbers proving the
regression. I've already posted some figures.
--
Gregory P. Smith added the comment:
Sorry I can't help on the windows side of things. I don't have access to any
windows systems.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16458
___
Roundup Robot added the comment:
New changeset 2d266ce80712 by Chris Jerdonek in branch '3.2':
Update the description of which package versions PyPI displays (issue #16400).
http://hg.python.org/cpython/rev/2d266ce80712
New changeset ec037316a445 by Chris Jerdonek in branch '3.3':
Merge from
Roundup Robot added the comment:
New changeset 7db2a27c07be by Chris Jerdonek in branch '2.7':
Backport from 3.2: update PyPI docs regarding listing versions (issue #16400).
http://hg.python.org/cpython/rev/7db2a27c07be
--
___
Python tracker
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16400
___
Piotr Dobrogost added the comment:
But I think Piotr's use case is when you download some new library (...)
Yes, indeed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16312
___
Brett Cannon added the comment:
Here is a new patch which removes the expected skips stuff and adds a
required_on argument to test.support.import_module() for those cases where
missing a module is an error (in the patch it's _winreg on Windows).
If people are fine with this cleanup then the
Richard Oudkerk added the comment:
In Torsten's example
from . import moduleX
can be replaced with
moduleX = importlib.import_module('.moduleX', __package__) (*)
or
moduleX = importlib.import_module('package.moduleX')
If that is not pretty enough then perhaps the new
New submission from Alejandro Javier Peralta Frías:
New to python-dev; I grab a beginner tasks increase test coverage and I
decided to add coverage to this bit of code in the quopri module:
# quopri.py
L138while n 0 and line[n-1:n] in b \t\r:
L139n = n-1
As far
Changes by Alejandro Javier Peralta Frías apera...@machinalis.com:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16473
___
R. David Murray added the comment:
I think I can answer your last question. There are two quopri algorithms, one
where spaces are allowed (message body) and one where they aren't (email
headers).
For the rest, I'd have to take a closer look than I have time for right now.
--
Alejandro Javier Peralta Frías added the comment:
I think I can answer your last question. There are two quopri algorithms,
one where spaces are allowed (message body) and one where they aren't
(email headers).
OK, thank you. Good to know.
--
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16473
___
___
Python-bugs-list mailing list
Ned Batchelder added the comment:
I wrote about this here:
http://nedbatchelder.com/blog/201211/tricky_locals.html A reader suggested
this addition to the docs, which I like:
Multiple invocations within the scope update and return the same dictionary
instance. When a trace function is in
New submission from alejandro david weil:
Add some 5% more code-coverage for imp module in tests.
--
components: Tests
files: imp_test_patch.diff
keywords: patch
messages: 175597
nosy: brett.cannon, tenuki
priority: normal
severity: normal
status: open
title: More code coverage for imp
Jesús Cea Avión added the comment:
Not sure increasing test coverage would be tolerated in 3.3.1. I would be +1 to
it.
--
nosy: +jcea
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16474
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +brian.curtin, loewis, mhammond, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16472
___
Éric Araujo added the comment:
Good idea. Could you add a note that this is new in 2.7? (Either using
versionadded Sphinx directives or just remarks in plain English, not sure which
one would be best.)
--
nosy: +eric.araujo
___
Python tracker
Georg Brandl added the comment:
We don't use versionadded/changed directives in the tutorial. (There was only
one until 2 minutes ago, which was misplaced in any case.)
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16474
___
___
Python-bugs-list
68 matches
Mail list logo