Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
There should be no cases where the pure python code runs instead of the
C code.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The name Proxy seems too vague. This class is all about targeted
delegation. Am curious, has this been out as a recipe; has it been
used in combat yet?
--
nosy: +rhettinger
___
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Attaching a version that's a little faster and cleaner with
PySequence_Fast_ITEMS.
--
nosy: +rhettinger
Added file: http://bugs.python.org/file10596/namedparam3.patch
___
Pyt
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Saving this for after the first beta goes out.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Georg, do you want to go ahead and apply this.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Georg, do you want to take it from here.
--
assignee: rhettinger -> georg.brandl
nosy: +georg.brandl
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The issue with unused constants is an artifact of the peepholer running
after the bytecode generation phase. When constant folding was
written, I intentionally left-out a step to remove unused constants
because of the code comp
New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
Martin, can you give this a second review?
See original discussion at:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/ac8
f121c5d043198#
Patch replaces constant size over-allocation with the amortized
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Added file: http://bugs.python.org/file10634/numbers3.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Not much feedback on comp.lang.python.
Does numbers3.diff look like what you had in mind?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Applied in r64303.
--
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Amended this fix to avoid quadratic behavior altogether. See issue
3116.
--
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I'm also -1 on the patch and think it is the wrong solution.
Efforts should probably be directed at hooking the output of the
interactive interpreter. We already have code that suppresses None
return values and assigns
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Jeffrey, do you have an interest in taking it from here?
--
assignee: rhettinger -> jyasskin
nosy: +jyasskin
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Sorry, I don't see any value in this kind of patch.
The line "contline = += line" is broken. The "+=" transformations and
else-clause eliminations trivially re-arrange code without any real
savings
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
These changes mostly look fine but shouldn't go it until after the
beta. This is really the wrong time in the release cycle to be making
minor spacing changes and making it harder to get a meaningful "svn
ann".
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
No problem. Whatever you think is best.
Still hoping that Jeffrey can take a look at the mixin approach and the
__rand__ logic. No one else seems to have an interest and I won't have
time to write the tests for a few day
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
To address the ideas brought-up so far, here's a new version that can
work with eval. The same appoach extends to oct and hex as well:
def newbin(f):
"""
>>> newbin(3.125)
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10664/floatdisp.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Added file: http://bugs.python.org/file10666/float.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Added file: http://bugs.python.org/file10667/float2.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The other reviewers asked for:
* same treatment for oct() and hex()
* platform independent exact representation of floats
* fixed-size exponential style output instead of tons of leading zeros
* output that round-trips through eval()
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: marketdickinson -> rhettinger
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Hmm, I don't see a way to preserve -0.0 without varying from the
standard format.
Attaching an updated patch for Amaury's comments.
Added file: http://bugs.python.org/file10673/float4.diff
__
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Added file: http://bugs.python.org/file10674/float5.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Mark, I added tests for Inf/Nan. Will this work on all platforms?
Added file: http://bugs.python.org/file10675/float5.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10674/float5.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Looks like a straight-forward patch.
--
assignee: rhettinger -> marketdickinson
resolution: -> accepted
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
This is consistent with the methods in named tuples (also to avoid name
clashes).
--
components: +None
keywords: +26backport
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTE
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Applied in r64438
--
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3051>
___
__
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3069>
___
__
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Still waiting for the patch.
--
assignee: rhettinger ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
This was fixed for Py3.0.
No interest was shown in backporting.
--
resolution: -> out of date
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Applied in r64475 .
Thanks for the patch.
--
resolution: -> accepted
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Applying a minimal version of this patch -- changing has_key() to
__contains__(). See r64511.
--
nosy: +rhettinger
resolution: -> accepted
status: open -> closed
___
Python tra
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Recommend rejecting. Too much work for zero performance payoff.
--
assignee: rhettinger ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Re-opening for further discussion.
-1 on Nick's suggestion to normalize hex output so that nearby floats
have nearby reprs. This unnecessarily complicates a simple, straight-
forward presentation. In the paper referenced by
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: rhettinger -> gvanrossum
nosy: +gvanrossum
title: Let bin() show floats -> Let bin/oct/hex show floats
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Updating patch so that the global symbol starts with _Py.
Added file: http://bugs.python.org/file10726/float7.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
+1 on removing the L. Also, it would be nice if reduced fractions were
restored to ints after the gcd step:
>>> Fraction(1*10**18, 3*10**18)
Fraction(1L, 3L)
___
Python tracker &l
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
How would the algorithm need to change to support leading-1
normalization?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Attaching a patch that includes normalization to a leading 1.
Added file: http://bugs.python.org/file10731/float8.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Add support for non-float floats.
Added file: http://bugs.python.org/file10742/float8.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Running FF3.0 on Windows it looks fine at various font sizes. Maybe this
is unique to the Ubuntu build.
Also, I looked at the style sheet and didn't see anything odd.
--
nosy:
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
-1 on the new macros. The mnemonic doesn't work for me and the example
code fragments are to my eyes less readable than before. These add to
the learning curve for reading and writing C extensions and provide
nearly ze
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Will get this fixed-up.
--
priority: -> high
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Fixed. See r64577
Thanks for the report.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
That one is technically okay because "seq" really is a set. But I'm
okay with you changing it anyway. It would be nice to see Py_SIZE used
everywhere in preference to the type specific versio
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I'm looking forward to your C implementation.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
In the Hashable ABC, there is a peculiar code fragment:
if "__hash__" in B.__dict__:
if B.__dict__["__hash__"]:
return True
break
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I don't think we should build in explicit support for bad designs that
violate the Liskov substitution principle. Are there any valid use
cases for wanting non-hashable subclasses of hashable classes?
If for some reason, t
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Mark, I'm tied-up with EuroPython until the 14th. Do you have time to
take a crack at this?
--
assignee: rhettinger -> marketdickinson
___
Python tracker <[EMAIL
New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
After exercising the fractions module, I've found it problematic that
there isn't a unified constructor to handle mixed data input types.
For example, when updating the accurate summation recipe at
http://aspn.acti
New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
>>> from fractions import *
>>> Fraction(3.1)
Traceback (most recent call last):
File "", line 1, in
Fraction(3.1)
File "C:\Python26\lib\fractions.py", line 100, in __new__
nume
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
keywords: +patch
Added file: http://bugs.python.org/file10811/fractype.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Don't think negative indices make much sense in this context. Will put
in a test to raise a ValueError for negative indices.
--
priority: -> high
___
Python tracker <[EMAIL
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Applied in r64835.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I think it is reasonable to get a macro definition change into 2.6.
The OP's request is essential for his application (running Python
on Nokia phones) and it would be a loss to wait two years for this.
Also, his request for a
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: rhettinger ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1700288>
___
_
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: rhettinger ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1568>
___
_
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Fixed in 64845.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Closing as not a bug.
FWIW, here's the relevant text from the docs:
-
23.2.3.6 Warnings
doctest is serious about requiring exact matches in expected output. If
even a single charac
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Adopted the solution used by functions in the math module. Functions
that accept floats also accept integral inputs. This improves
usability in face of mixed float/int data or decimal/int data.
See r64846.
--
reso
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
nosy: rhettinger
priority: high
severity: normal
status: open
title: Need -3 warning for exec statement becoming a function
versions: Python 2.6
___
Python tracker <[EMAIL PROTECTE
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
resolution: -> invalid
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: georg.brandl -> rhettinger
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
So far this looks good. Will complete the review on the next leg of my
flight (about 12 hrs).
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: -> rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3106>
___
_
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I think this is closer to a language wide change and should probably be
addressed for 2.7 and 3.1. It would be great to change the C argument
parsing API to make its error messages more specific.
For Py2.6, I think things are f
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I'll look at the test_set failure if no one else gets to it first.
--
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The patch looks good. I would coded hex_from_char() using a lookup
into "0123456789abcdef" which uses no unpredicatable branches.
Likewise, I would done hex_from_char() with a case statement (limiting
the call to singl
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I can't reproduce the error using Windows.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Mark, please go ahead and apply so the buildbots will have time to give
it a run on all the platforms before beta 2 is cut. Be sure to make
Guido's edits to the Misc/NEWS entry.
___
Pyt
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Issues:
1. In Py3.0, the cmp argument has been dropped completely. It has been
supplanted by the key function.
2. Previous feature requests for cmp/key/reverse have been rejected.
The problem is that in a series of searc
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I'll build-out the discussion a bit and mention the new float.hex() and
float.as_integer_ratio() methods. Will also add references to decimal
and fractions.
--
assignee: georg.brandl -> rhettinger
nos
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I think this is premature until be know for sure that % formatting will
in-fact be deprecated in Py3.1. Time will tell how well the new format
options get accepted. Likewise, we'll learn more about how readily
legacy c
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
for k in d.keys():
return k # needs to return a list
--
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The example was mucked-up :( The question is that when for-looping
over d.keys/items etc, how you know that the body of the loop isn't
going to mutate the dict?
___
Python tracker <[E
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Since we're not in a hurry for Py2.7 and 3.1, I would like to this
kicked around a bit on the newsgroup and in numpy forums (personally, I
would also post a pure python equivalent to the ASPN cookbook for
further commentary).
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
It would be nice if we knew the error bounds for each of the
approximation methods. Do we know how the coefficients were generated?
When switching from one method to another, it might be nice to have a
range where the results
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I think this is the wrong approach. It would be better to have a
separate getheader() method. Having __init__ do the deed is at odds
with other uses of __init__ that only do setup but don't start reading.
--
nosy:
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I prefer your idea to expose PyLong_Numbits(). IMO, frexp() is very
much a floating point concept and should probably remain that way.
--
nosy: +rhettinger
___
Python tracker &
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Another reason to leave frexp() untouched is that it is tightly
coupled to ldexp() as its inverse, for a lossless roundtrip:
assert ldexp(*frexp(pi)) == pi
This relationship is bound to get mucked-up or confused if frexp
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
numbers.Integral is already way too fat of an API. Am -1 on expanding
it further. Recommend sticking with the simplest, least invasive,
least pervasive version of your request, a numbits() method for ints.
FWIW, in Py2.6 y
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Why isn't tgamma() simply named gamma()? The t prefix does nothing for
me except raise questions.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Changes by Raymond Hettinger <[EMAIL PROTECTED]>:
--
assignee: -> rhettinger
nosy: +rhettinger
versions: -Python 2.5
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I'm working on this one. Alternate patch attached.
The problem with the old one is that it slows down every access to the
shelf and it prevents assignment to self.dict which has always been
allowed.
The new patch imp
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Can you also implement blending of approximations: (1-t)*f1(x) + t*f2
(x)
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Fixed in r65233
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
-1 on renaming. I concur with Mark that we are under no obligation to
match the names used in the spec -- only the functionality matters --
also we're already got a history of at least slightly different names.
I also see n
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
P.S. I also agree with Mark that the 1.68 update should be treated as a
bugfix and go into the next beta, preferably as soon as possible.
Facundo and I should both agree to give it a quick and thorough review
so that the beta
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
The tests at floating point boundaries should probably be removed and
their behavior should be left undefined.
--
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTE
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Will look back in my notes. I believe this was previously discussed
and rejected.
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Georg's suggestion seems reasonable. Alternatively, you can just catch
AttributeError or TypeError.
Lowering the priority to normal and marking as unresolved. At some
point, it would be nice to review the whole code bas
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
This is duplicate of http://bugs.python.org/issue1615701 . The
check_exact solution was attempted once but it broke code in a subtle
and hard to find way so it had to be reverted. For your use case, try
UserDict instead of subcl
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
+1 for applying to 2.6.
izip_longest() is a perfect example of where it's important.
--
nosy: +rhettinger
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Can't this be handled by 2-to-3 instead of a -3 warning?
--
components: +2to3 (2.x to 3.0 conversion tool) -Library (Lib)
nosy: +rhettinger
___
Python tracker <[EMAIL PRO
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
Guido, what say you, live with it, revert it, or apply
Py_TPFLAGS_HAVE_VERSION_TAG to all core types?
--
assignee: arigo -> gvanrossum
nosy: +gvanrossum, rhettinger
___
Python tracke
1301 - 1400 of 9609 matches
Mail list logo