Changes by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12005>
___
___
Python-
Raymond Hettinger added the comment:
Brett, can you test this?
--
assignee: -> brett.cannon
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue11163>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
I'll replace this with a better example using binary chunked reads that
terminate with an empty string.
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org
Raymond Hettinger added the comment:
Feature creep would not be good for the json module.
--
___
Python tracker
<http://bugs.python.org/issue12001>
___
___
Pytho
Raymond Hettinger added the comment:
Are you sure those tests are C specific? Please be careful about doing
unnecessary complexification of this module's tests.
--
assignee: ezio.melotti -> rhettinger
nosy: +rhettinger
___
Python tracke
Raymond Hettinger added the comment:
Move on, nothing to see here ;-)
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
I'm imagining a cleaner testing style, like this:
class TestHeap(unittest.TestCase):
def test_nsmallest(self):
self.assertEqual(heapq.nsmallest(3, range(10)), [0,1,2])
...
@test_support.requires('_heapq
Raymond Hettinger added the comment:
Some of the tests were incorrectly marked as being C specific. I've fixed that
on the 2.7 branch. Re-assigning back to Ezio.
Overall, I don't think the current approach to testing both paths is elegant.
Is there some alternative approach
Raymond Hettinger added the comment:
Attaching a rough draft of a way to simplify dual path testing. The idea is
that the suite shouldn't have to be rewritten with self.module.heapify(...)
references throughout. Instead, tests are written normally and the only thing
that changes i
Raymond Hettinger added the comment:
+1 for increasing the number of random characters to 8
-1 for restoring uppercase letters
--
___
Python tracker
<http://bugs.python.org/issue12
Raymond Hettinger added the comment:
Please don't make these kind of changes. Guido has been clear that the docs
need to affirmatively state what the language does.
Except for certain security risks or segfault risks, the docs should avoid
wording along the lines of "fe
Raymond Hettinger added the comment:
The tutorial is meant for newcomers. The experience needs to be positive and
not leave the reader with worries that something bad will happen if they make a
misstep.
People commonly use the tutorial to evaluate the language as a whole. The
tutorial
Raymond Hettinger added the comment:
One other stylistic note. The tone of the tutorial (and all the docs) needs to
be respectful of the readers intelligence. We don't presume that the readers
are stupid. We lay out the relevant information, show motivating use cases,
provide glo
Changes by Raymond Hettinger :
--
assignee: georg.brandl
components: Documentation
files: style.diff
keywords: patch
nosy: georg.brandl, rhettinger
priority: normal
severity: normal
status: open
title: Expand the style guide
Added file: http://bugs.python.org/file21951/style.diff
Raymond Hettinger added the comment:
See http://bugs.python.org/issue12047
--
___
Python tracker
<http://bugs.python.org/issue11948>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
> there's a "talk down them" which looks funny to me in this word order.
It was missing a word. Should be "talk down to them". Thanks for spotting
this -- I fix it in the commit.
> One question: I could imagine wording
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12047>
___
___
Python-bugs-
Raymond Hettinger added the comment:
> On the issue itself, I'm -1 on making comparisons
> with float('nan') raise: I don't see that there's
> a real problem here that needs solving.
>
> Note that the current behaviour does *not* violate IEEE 754,
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue11957>
___
___
Python-bugs-list mai
Changes by Raymond Hettinger :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11610>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12080>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue12079>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
assignee: lukasz.langa -> rhettinger
___
Python tracker
<http://bugs.python.org/issue12086>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
This is a venerable section of the tutorial that has been exposed to many, many
readers and AFAICT it has never caused a problem. So, I see no need to make a
change to it.
Also as Georg points out, the docs (especially the tutorial) are not about
Changes by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12077>
___
___
Python-
Changes by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12028>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue11986>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue8796>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue11949>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12146>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
> Looks like a reasonable proposal, but coding this in C is a chore.
It's not that bad. Most C code is a bit of a chore compared to Python but it
really doesn't take much to write a C equivalent of: "functools.partial(%r,
%s)"
Raymond Hettinger added the comment:
The choice between ValueError and TypeError can sometimes be ambiguous and seem
arbitrary and I understand why you're gravitating towards ValueError (because
it works some values and not others), but in this case the API is already fixed
by what
Changes by Raymond Hettinger :
--
assignee: skrah -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10356>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
> Yes, hex numeral would be more accurate than hex digit.
Stick with hex digit. We've used that phraseology for a long time. See
string.hexdigits for example. And "hex numeral" just sounds weird -- it makes
me do a double-take to see
Raymond Hettinger added the comment:
Do not change the examples in collections.rst.
That would interfere with the clarify of what
is being demonstrated. For example, the hamlet.txt
example is not about file reading, it about
counting words.
--
nosy: +rhettinger
Raymond Hettinger added the comment:
I think the other (non collections patches) are fine. The change doesn't break
up the flow of the text.
--
___
Python tracker
<http://bugs.python.org/is
Raymond Hettinger added the comment:
Separate note for Éric: the try/finally examples do not need to change. Those
are valid python. Users need to learn both try/finally and the with-statement.
--
assignee: d...@python -> rhettinger
___
Pyt
Raymond Hettinger added the comment:
Patch is fine. Go ahead and apply.
--
nosy: +rhettinger
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
FWIW, an idiom I use in Py2.x is:
for block in iter(partial(f.read, BLKSIZ), ''):
. . .
This works with both single bytes at time and multiple bytes at a time.
--
nosy: +rhettinger
___
Pyth
Raymond Hettinger added the comment:
"We already got one, and it's very nice-a"
ISTM, this should be done with regular date arithmetic in the datetime module.
>>> date(1964, 7, 31) - date(1963, 12, 31)
datetime.timedelta(213)
I don't see why we need a new functio
Raymond Hettinger added the comment:
Added a comment to the docstring.
See r86631.
--
___
Python tracker
<http://bugs.python.org/issue7770>
___
___
Python-bug
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue7770>
___
___
Python-bugs-
Changes by Raymond Hettinger :
--
assignee: d...@python -> mark.dickinson
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue10488>
___
__
Raymond Hettinger added the comment:
Sorry, it's time to close this one. The code is not buggy, it is documented as
being a bound method and that is a perfectly acceptable python coding style to
use bound methods as callables. It's also been around for a *very* long
without caus
Raymond Hettinger added the comment:
Éric, please apply most of these.
In the atexit patch, the first change is wrong. Change it to a
try/except/finally or skip it altogether.
In the collections patch, only include the change for the tail example; the
other two should remain unchanged
Raymond Hettinger added the comment:
> Committed the ValueError in r86517 (py3k)
As discussed on IRC, I've reverted this change.
--
resolution: fixed -> invalid
status: open -> closed
___
Python tracker
<http://bugs.pyth
Raymond Hettinger added the comment:
As discussed with Mark, am closing this one after having applied documentation
changes.
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
I'm abandoning this one since I couldn't find a way to do it that didn't impair
performance. Unlike C++, it is not uncommon in Python to use exceptions such
as IndexError for control flow. There was too little added value in
building-out
Raymond Hettinger added the comment:
See r86650
--
resolution: -> fixed
status: open -> closed
versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1
___
Python tracker
<http://bugs.python.org/
Changes by Raymond Hettinger :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue7212>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
After more thought, am leaving the doc strings as-is. They are succinct and
accurate. I have updated the sorting how-to to more thoroughly cover the
basics of sorting.
--
resolution: -> wont fix
status: open ->
Raymond Hettinger added the comment:
Added the i,j,k notes
Left out the processor word size and C-type specifications in-part because it
is an implementation detail subject to change. Another reason is that it
doesn't apply to necessarily to all sequences. Slices take arbitrary ob
Raymond Hettinger added the comment:
See r3292.
--
___
Python tracker
<http://bugs.python.org/issue3292>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
+1 for deprecating three-arg pow for the reasons given.
A user is much better-off composing well-defined operations
than using our short-cut, with our chosen assumptions.
Apologies for taking so long to think this one through.
--
assignee
Raymond Hettinger added the comment:
Rejecting this one for reasons we discussed earlier. The assertEqual() method
needs to be the primary interface. Everything else is starting to mix content
and presentation (i.e. passing in separators). The existing repr() works fine
with bytes and
Raymond Hettinger added the comment:
I don't have any other insights on this one. Assigned by to Antoine who
appears to have put some thought into it.
--
assignee: rhettinger -> pitrou
___
Python tracker
<http://bugs.python.org
Raymond Hettinger added the comment:
Deferring the general rewrite until 3.3.
It would need to have a lot of people look
at it and evaluate it. I no longer think
there is time for that before the 3.2 beta.
--
resolution: -> later
versions: +Python 3.3 -Python
Raymond Hettinger added the comment:
These mostly look good. Do leave the howto documents as-is. They have some
value across multiple versions of Python. Also, the descriptor how-to in
particular gets some benefit from keeping (object) explicit because it helps
remind users which version
Raymond Hettinger added the comment:
Go ahead an remove the word "indefinitely".
--
___
Python tracker
<http://bugs.python.org/issue10138>
___
___
Raymond Hettinger added the comment:
Opened back up for the new patch (posted after the previous close).
--
status: closed -> open
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
> I’m not 100% sure I should change 'r' to 'rb' in logging:
> It’s unrelated to with, and the rest of the file
> has not been checked for similar errors.
Good catch. This should only be a with-statement transformation
Raymond Hettinger added the comment:
Thanks for the revisions and timing updates. I'm heartened that the
common-case of sorting without a key function isn't negatively impacted. That
result is surprising though -- I thought the concept was manipulate the key and
value arrays a
Raymond Hettinger added the comment:
> If the "key" parameter was not used, then the values pointer
> is a null pointer.
. . .
> Since the branch will always be the same throughout any given
> call to sort(), CPU branch prediction is effective making the
> branch
Raymond Hettinger added the comment:
That looks fine. Perhaps s/trees/binary trees
--
assignee: rhettinger -> georg.brandl
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
Guido approved these both in a thread earlier this year.
The reasoning for copy() was the same as for clear(), some folks couldn't cope
with:
b = a[:]
--
nosy: +rhettinger
title: Add list.clear() -> Add list.clear() and l
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10519>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
Try to match the whitespace convention of the surrounding code.
--
assignee: rhettinger -> anthonybaxter
nosy: +anthonybaxter
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
A few lines later, a similar change can be made for set_discard.
--
assignee: anthonybaxter -> arigo
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
assignee: lukasz.langa -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10533>
___
___
Python-
Raymond Hettinger added the comment:
> It would be very handy to allow for concrete values as well.
Do you have use cases for a concrete integer value that isn't zero?
Since we can currently use defaultdict(int) or defaultdict(tuple), is the
purpose just to create a more direct spe
Raymond Hettinger added the comment:
[Łukasz Langa]
> __missing__ didn't appear to be the one obvious way to anyone.
Two thoughts:
* There is part of the Zen that says that way may not be obvious unless your
Dutch. In this case, __missing__ was the API designed by Guido to ha
Changes by Raymond Hettinger :
--
assignee: michael.foord -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10242>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
After discussion with Michael and Guido, am limiting this to:
* Fixing assertItemsEqual as described in issue10242
* Moving the docs for type specific equality methods inside the docs for
assertEqual to emphasize that those get dispatched automatically
Raymond Hettinger added the comment:
Yes, all the variants of RegexpMatches --> Regex
No, on deprecations. Just add a new alias and note in the docs that the
oldname is obsolete. Naming deprecations cause too much trouble for too little
bene
Raymond Hettinger added the comment:
Mark, can you opine on this?
--
assignee: belopolsky -> lemburg
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
Applied in r86828.
The output could still be made nicer, perhaps something along the lines of:
expected 6, got 4: 'wand of fireballs'
expected 2, got 7: 'ring of invisibility'
. . .
--
priority: high -> norma
Raymond Hettinger added the comment:
Hmm, what an interesting and unexpected side-effect of the efforts to hide the
loop induction variable.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
Attaching possible code for nicer output.
--
assignee: rhettinger -> michael.foord
resolution: fixed ->
Added file: http://bugs.python.org/file19833/nice_output.diff
___
Python tracker
<http://bugs.p
Raymond Hettinger added the comment:
I suggest Py_UNICODE_ADVANCE() to avoid false suggestion that the iterator
protocol is being used.
--
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
> A possible solution could be in
> collections.Iterator.__subclasshook__
> checking for both required methods.
That makes sense. PEP 234 requires
iterators to support both methods.
--
assignee: ->
Raymond Hettinger added the comment:
This discussion should probably be moved to python-dev. With tools like
Twisted's inlineDefer or the Monocle package, there is a growing need to be
able to use yield in complex expressions. Yet, that goes against the trend
toward making lists comps
Raymond Hettinger added the comment:
Instead of
hasattr(str,'next')
consider using
isinstance(str, collections.Iterable)
Also consider changing the variable name from the now overly type specific,
"str" to something like "source" to indicate the sign
Changes by Raymond Hettinger :
--
assignee: rhettinger -> ned.deily
nosy: +ned.deily
___
Python tracker
<http://bugs.python.org/issue5150>
___
___
Python-
Raymond Hettinger added the comment:
Ezio, please do the regexp-->regex changes and move the tests under Lib/test.
--
assignee: rhettinger -> ezio.melotti
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Fixed in r86857.
Needs backport.
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue10565>
___
___
Raymond Hettinger added the comment:
Of those, it makes the most sense to move the json tests to Lib/tests. Bob is
not externally maintaining the 3.x version. It's all our now.
Also, it looks like importlib is in a maintenance mode now.
There is merit to keeping 2to3, ctypes, sqlite
Raymond Hettinger added the comment:
Without a patch and compelling use cases, this has no chance. Recommend
closing.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue5
Raymond Hettinger added the comment:
Alexander, do you want to take care of the backport?
--
assignee: rhettinger -> belopolsky
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg117005
___
Python tracker
<http://bugs.python.org/issue8743>
___
___
Python-bug
Raymond Hettinger added the comment:
Fixed in r86874.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Okay, go ahead with the second patch.
With the following changes:
_CacheInfo = namedtuple("CacheInfo", "maxsize size hits misses")
Change the variable names:
cache_hits --> hits
cache_misses --> misses
Raymond Hettinger added the comment:
Thx
--
___
Python tracker
<http://bugs.python.org/issue10586>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Alexander, I don't see anything wrong with patch, nor anything compelling about
it either. It's your choice whether or not to apply.
--
___
Python tracker
<http://bugs.python.
Raymond Hettinger added the comment:
Thx.
--
assignee: rhettinger -> pitrou
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
+1 on the basic idea of moving elements in the keys and values arrays at the
same time thereby eliminating the fragmented memory overhead of the sortwrapper
indirection.
I would like the patch to be restricted to just that change. The other tweaks
are
Raymond Hettinger added the comment:
Deferring to 3.3.
--
priority: normal -> low
versions: +Python 3.3 -Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
This does not conflict with the other proposed changes to timeit and it is
in-line with Guido's desire that to expose useful parts currently buried in the
command-line logic.
Amaury, you've shown an interest. Would you like t
Raymond Hettinger added the comment:
Antoine, what do you want to do with the one? Without a good test case the
OP's original issue is undiagnosable.
--
assignee: rhettinger -> pitrou
versions: +Python 3.1
___
Python tracke
Raymond Hettinger added the comment:
Any new logic should make maximum use of existing tools:
def __isub__(self, other)
if len(other) > len(self)*8:
other = self & other
. . .
# rest of isub unchanged
--
stage: patch review -> n
901 - 1000 of 9609 matches
Mail list logo