Changes by Raymond Hettinger :
--
assignee: rhettinger -> stutzbach
___
Python tracker
<http://bugs.python.org/issue9131>
___
___
Python-bugs-list mai
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9396>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Fixed in r84255.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Changes by Raymond Hettinger :
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue8743>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
Fixed in r84256.
Don't think this needs to be backported.
--
resolution: -> fixed
status: open -> closed
versions: +Python 3.2 -Python 2.6, Python 2.7
___
Python tracker
<http://bugs.python
Raymond Hettinger added the comment:
Thanks Benjamin. I concur with your conclusion.
--
___
Python tracker
<http://bugs.python.org/issue9659>
___
___
Python-bug
Raymond Hettinger added the comment:
This seems reasonable. Will look at it in the next few days.
--
assignee: -> rhettinger
keywords: +easy
nosy: +rhettinger
priority: normal -> low
stage: -> needs patch
versions: +Python 3.2 -P
Raymond Hettinger added the comment:
What change are you proposing?
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9686>
___
___
Python-bug
Raymond Hettinger added the comment:
Hello Tim! If you have a chance, please also take a look at issue9685 which I
was planning to work on in the next couple of weeks.
For memoizing tuple hashes, I'm inclined to think the one extra field is worth
it. That would help all the cases
Changes by Raymond Hettinger :
--
assignee: -> giampaolo.rodola
nosy: +giampaolo.rodola
___
Python tracker
<http://bugs.python.org/issue9686>
___
___
Python-
Raymond Hettinger added the comment:
--
___
Python tracker
<http://bugs.python.org/issue9702>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
The current design has existed for almost twenty years.
It is deeply embedded in the language. For better or
worse, it cannot and won't change.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.py
Raymond Hettinger added the comment:
FYI, there is a section of the docs devoted to notifications and attribution
licenses:
http://docs.python.org/license.html#licenses-and-acknowledgements-for-incorporated-software
--
nosy: +rhettinger
___
Python
Raymond Hettinger added the comment:
FWIW, the usual way to spell this in Python is:
my_dict_1.update((k, my_dict_2[k]) for k in ['a', 'c'])
We try to keep filtering operations separate from map/fold operations for
orthognality.
Raymond Hettinger added the comment:
> maybe the mention of the SortedCollection recipe should
> be a little more prominent.
Thanks for the suggestion. Will look at moving the note higher on the page.
--
components: +Documentation -Library (Lib)
status: closed -
Raymond Hettinger added the comment:
Fixed in r84383.
--
resolution: duplicate -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Please leave this for me.
Thank you.
--
___
Python tracker
<http://bugs.python.org/issue8685>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
It would be nice to get this fixed before the next release.
--
___
Python tracker
<http://bugs.python.org/issue9212>
___
___
Raymond Hettinger added the comment:
+1 for the basic idea.
It could use a better name, Sequence.has_methods(range) reads backwards to me.
Perhaps something like: Sequence.implemented_by(range) or
Sequence.verify_full_api(range) or some such.
Also, when the tests get added, they should go
Changes by Raymond Hettinger :
--
nosy: -rhettinger
___
Python tracker
<http://bugs.python.org/issue4819>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
The patch looks fine.
--
nosy: +rhettinger
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
The operator methods in setobject.c should be liberalized to accept instances
of collections.Set as arguments. For speed, they should continue to check
PyAnySet_Check(other) first and then if that fails, fall back to testing
PyObject_IsInstance(other
Raymond Hettinger added the comment:
I'm marking this one as rejected. The timings have shown mixed results (some
favorable, some not). In general, there is a bias against expanding the number
of opcodes because 1) there aren't that many codes available, 2) it grows the
size of
Raymond Hettinger added the comment:
Kelly, thanks for posting the idea.
I'm going to close this one for now
but it can be reopened if compelling
use cases arise.
--
resolution: -> rejected
status: open -> closed
___
Python tra
Raymond Hettinger added the comment:
Am deferring this to Py3.3. There is a workaround available just using
duck-typing and I would like to wait until more more has been done on StructSeq
before setting committing to an new namedtuple Abstract Base Class (one
released, it would be very hard
Raymond Hettinger added the comment:
Unassigning, this needs fresh thought and a fresh patch from someone who can
devote a little deep thinking on how to solve this problem cleanly. In the
meantime, it is no problem to simply cast the CSV tuples into named tuples.
--
assignee
Changes by Raymond Hettinger :
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue9269>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
This proposal hasn't gotten much love or support and I'm no longer interested
in it. Aside from ''.join and '{}'.format, there doesn't seem to be many
common cases, so there's no big win here.
--
assign
Changes by Raymond Hettinger :
--
assignee: rhettinger -> terry.reedy
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue4395>
___
___
Raymond Hettinger added the comment:
Rough cut at a first patch is attached.
Still thinking about whether Set operations should be accepting any iterable or
whether they should be tightened to expect other Set instances. The API for
set() came from set.py which was broadly discussed and
Raymond Hettinger added the comment:
Sorry, this isn't a bug. I think you've rediscovered a property of mutable
objects. See
http://docs.python.org/tutorial/controlflow.html#default-argument-values for an
example.
--
nosy: +rhettinger
resolution: -> invalid
status: o
Raymond Hettinger added the comment:
Fixed in r84447
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Consider breaking the operator module documents into sections, grouping all of
the in-place ops into the last section. Start that section with a full
description of how in-place works in python and show some examples of
successful way to use the in-place
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue9717>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
+1 for PyObject_Hash returning a Py_ssize_t.
Nothing good can come from having a hash table larger than the range of a hash
value. Tests may pass but performance would degrade catastrophically.
--
___
Python
Raymond Hettinger added the comment:
Put in a fix with r84576. May come back to it to see if it can or should be
optimized with C. For now, this gets the job done.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
Raymond Hettinger added the comment:
Added a doc fix to r84576.
Advice is "don't do that" ;-)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://b
Raymond Hettinger added the comment:
Fixed in r84574 and r84576. The seed function no longer uses hash() for str,
bytes, or bytearray arguments.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Sorry, this needs to stay closed.
It has no chance.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9
Raymond Hettinger added the comment:
The sort of editing should be done *much* later.
I expect to be updating the file every few days
and occasionally running the out through a spelling
and grammar checker. Right now, it's a work in progress
that doesn't benefit from m
Raymond Hettinger added the comment:
Just focus on the table for assert* methods. This is the one category that
users will need to look-up over and over again. The goal is to make the docs
more usable, not more voluminous.
Also, I suggest finding meaningful groupings (don't stick
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue9802>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
After more thought, I'm -1 on this. "Consistency" is a weak argument in favor
of this. We need to be more use case drivenm and it there is no evidence that
this is needed. Also, there is a reasonable concern that using negative
indi
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue9816>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Thanks for the report. Something does appear to be broken. When the states
are different, the random numbers should be different. Am looking in to it.
In the mean time, I recommend against using jumpahead() with MT. It is better
to separately seed
Raymond Hettinger added the comment:
I see the problem now. Random.jumpahead(n) does a very poor job of shuffling
MT's state when n is small. The first few numbers of the state are different
but some of the later ones are not. When random() crawls across parts of the
state tha
Raymond Hettinger added the comment:
Thanks for the interesting thread.
I do agree with your suggestion to close this one though.
--
nosy: +rhettinger
resolution: -> rejected
status: pending -> closed
___
Python tracker
<http://bugs.p
Raymond Hettinger added the comment:
That is the documented and tested behavior:
http://docs.python.org/library/collections.html#ordereddict-objects
"""
Equality tests between OrderedDict objects are order-sensitive and are
implemented as list(od1.items())==list(od2.items()).
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9826>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
Patch?
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue9826>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
This is an unfortunate aspect of using __del__.
I don't see a way around it without reintroducing
weak references.
Of course, your code can also use weak ref proxies
to avoid creating uncollectible circular garbage.
--
priority: normal -
Raymond Hettinger added the comment:
Éric, I've got this one. Thx.
--
___
Python tracker
<http://bugs.python.org/issue9825>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
For 2.7, removed __del__ in r84725.
For 3.2, replaced __del__ with weakrefs in r84727.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Fixed in r84728 and r84729.
Will backport to 2.7 shortly.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
New submission from Raymond Hettinger :
Add a recursive_repr() decorator to provide a solution to the problem of
creating a container __repr__ method that doesn't fail for recursive calls.
--
files: recursive_repr.patch
keywords: patch
messages: 116239
nosy: rhettinger
priority: n
Changes by Raymond Hettinger :
--
components: +Documentation -Interpreter Core
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
Committed in r84792.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Documented the current behavior in r84822.
Mark, if you're free on IRC at some point, I would like to discuss further.
--
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
I have a hard time caring about this. The main value of sys.getsizeof()
is to enable developers to determine the internal sizes of basic objects on a
given build. IIRC, there was no intention for this to become a requirement for
pure python classes
Changes by Raymond Hettinger :
--
keywords: +patch
stage: -> patch review
type: behavior -> feature request
Added file: http://bugs.python.org/file18896/od_size.diff
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
This example needs to stay. It was one of the principal motiviating use cases
for defaultdict and it is a good, simple, understandable example of how to use
it.
Also, I don't want to cross-link these two tools because they a subtly
different
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9886>
___
___
Python-
Raymond Hettinger added the comment:
This was an interesting idea. Essentially, it created cell-style objects for
entries in a global dict so that functions using load_global could access and
update the values directly.
All dicts paid a price for this, but only module dicts would benefit
Raymond Hettinger added the comment:
We need a reproducible test before being able to go forward with this. At the
very least, that would help isolate whether this is a build specific C library
issue.
--
nosy: +rhettinger
resolution: -> invalid
status: open ->
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg63791
___
Python tracker
<http://bugs.python.org/issue1686>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
This looks fine.
--
assignee: barry ->
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/
Raymond Hettinger added the comment:
Can we close this one?
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue1708652>
___
___
Python-bug
Raymond Hettinger added the comment:
I don't see anything wrong with this idea, but I don't really see a need for it
either. AFAICT, this has never been requested in the 20 years that range() has
been in Python. This is probably YAGNI. It may also be in violation of the
Raymond Hettinger added the comment:
One other thought. If there is a perceived need, I would rather an alternate
approach that unifies a language a bit by letting range() expose its arguments
as a slice and modify its input to accept a slice.
>>> range(0, 20, 2).slice
slice(
Changes by Raymond Hettinger :
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue1708652>
___
___
Pyth
Raymond Hettinger added the comment:
Mark, please stop closing these based on age.
The needs to be a determination whether this
is a valid bug. If so, then a patch is needed.
If not, it can be closed.
--
assignee: jhylton ->
nosy: +rhettinger
status: pending ->
Raymond Hettinger added the comment:
See r84852
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9865>
___
__
Raymond Hettinger added the comment:
After discussion on IRC, have decided to make the Set ABC more closely match
setobject.c:
1) loosen setobject.c binary operations to accept any Set rather than any
set/frozenset (see attached patch).
2) tighten Set.__or__, etc to only accept Set rather
Raymond Hettinger added the comment:
Unassigning. If someone is interested creating a patch, I think it is a
reasonable request.
--
assignee: rhettinger ->
priority: low -> normal
stage: -> needs patch
versions: -Python 2.7
___
Pytho
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg116998
___
Python tracker
<http://bugs.python.org/issue8743>
___
___
Python-bug
Raymond Hettinger added the comment:
After discussion on IRC, have decided to make the Set ABC more closely match
setobject.c by loosening setobject.c binary operations to accept any Iterable
rather than any just a set/frozenset.
--
___
Python
Changes by Raymond Hettinger :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9906>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Conceptually, this is a reasonable approach.
I originally put in the sortwrapper as a straight-forward technique of tackling
the 2.x API which allowed a key-function, or a cmp-function, or both, or
neither. IOW, the original motivation is now gone
Raymond Hettinger added the comment:
It is not a reasonable request for math float functions to produce exact
integer values and there is some harm in making further alterations to the
existing algorithm (the more you tweak it in one place, the more you create
oddities somewhere else
Raymond Hettinger added the comment:
Ben, I don't think there is any value is opening more issues like
pprint-doesn't-handle-object-x (named tuples, defautdicts, deques, generators,
etc).
As it is currently designed, pprint doesn't offer usable hooks and it is not
easy
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9974>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
In the past, we've allow ceval.c to peer through encapsulation in order to have
fast paths.
--
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
At any rate, I believe this used to be a fast-path. IIRC, Aahz put it in after
demonstrating a considerable speed boost for common cases. Aahz, do you have
any institutional memory around this one?
--
nosy: +aahz
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10025>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10029>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
Thanks, this is a good idea.
--
___
Python tracker
<http://bugs.python.org/issue10042>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
I'll update the docs with an equivalent that works and that has a comment
showing when the StopIteration is raised and caught.
--
___
Python tracker
<http://bugs.python.org/is
Raymond Hettinger added the comment:
Fixed handling on unary minus in r85314. In so doing, it also liberalized what
literal_eval() accepts (3j+4 for example). This simplified the implementation
and removed an unnecessary restriction which wasn't needed for "safety".
Raymond Hettinger added the comment:
Refuse the temptation to hypergeneralize ;-)
Also refuse the temptation to double the size of the docs (more != better).
In the case of min/max, the pure python versions may add some value in showing
that the first match is what is returned. But the code
Raymond Hettinger added the comment:
We should probably just make reference to the collections.Set() abstract API
instead of listing out all operations.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue7
Raymond Hettinger added the comment:
The '^' corresponds to the __xor__ magic method.
snip from _abcoll.py:
def __xor__(self, other):
if not isinstance(other, Set):
if not isinstance(other, Iterable):
return NotImplemented
ot
Raymond Hettinger added the comment:
Perhaps replace equivalent with "based on" or some such. This is a very minor
nit and likely of interest to no one except the OP.
--
priority: normal -> low
___
Python tracker
<http:/
Raymond Hettinger added the comment:
The absence of index() from collections deque wasn't an oversight. Deques are
not really about indexed access, they are about appending and popping from the
ends. I'm curious about your use case and whether it is a good match for this
data
Raymond Hettinger added the comment:
Max, thanks for reporting this. I've replaced the sample code, making it work
correctly and more clearly showing the logic.
See r85345 and r85346.
Daniel, we need to sync-up on the meaning of marking a report as "accepted".
Traditionall
Changes by Raymond Hettinger :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10029>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
Please pass the word along if you get a chance :-)
--
___
Python tracker
<http://bugs.python.org/issue10029>
___
___
Pytho
Raymond Hettinger added the comment:
Python's order of operations runs the exponentation before the unary minus.
This convention makes the unary minus behave more like the subtraction operator
so that: -x**n == 0 - x**n.
This convention is somewhat common but there are exceptions su
Raymond Hettinger added the comment:
I saw that when I put in in.
It doesn't fit the overall category
but it does belong in the same general
grouping and the notes make the semantics clear,
so there is no harm in it and I like the current
presentation better than the alterna
Changes by Raymond Hettinger :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10067>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
Are you sure that this is useful enough to warrant inclusion in the standard
lib? I don't know of anyone else who has used the same idiom. It seems crufty
to me -- something that adds weight (mental burden and maintenance effort)
without adding
501 - 600 of 9609 matches
Mail list logo