Raymond Hettinger added the comment:
It looks like everyone is in favor of the change. I'll apply the patch after
adding some comments and tests.
--
assignee: ncoghlan -> rhettinger
___
Python tracker
<http://bugs.python.org
Raymond Hettinger added the comment:
Until and unless this gets fixed, perhaps we should document some sort of
workaround. One possibility is attached.
--
Added file: http://bugs.python.org/file20940/annotations_workaround.py
___
Python tracker
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg129664
___
Python tracker
<http://bugs.python.org/issue11333>
___
___
Python-bug
Changes by Raymond Hettinger :
Removed file: http://bugs.python.org/file20940/annotations_workaround.py
___
Python tracker
<http://bugs.python.org/issue11333>
___
___
Raymond Hettinger added the comment:
Until and unless this gets fixed, perhaps we should document some sort of
workaround. One possibility is attached.
--
Added file: http://bugs.python.org/file20941/annotations_workaround.py
___
Python tracker
Raymond Hettinger added the comment:
The patch is fine. Do consider using assertIsNot() in the tests. Then go
ahead and apply it.
The OverflowError in bytearray.pop() is a bug, please open a separate report
for it and make a patch changing it to IndexError. Assign that bug report to
me
Raymond Hettinger added the comment:
> Hmm, shouldn't self.__class__(self) be a
> good default implementation of copy()?
>
> I'd expect any sequence to support this way
> of creation from another sequence, even if it's inefficient.
The copy() method isn't
Raymond Hettinger added the comment:
> how about we give every function a `.__parent_class__`
> attribute saying which class it is a method of?
Won't work. The same function can be used in multiple classes.
The function object is independent of the class. This is conc
Raymond Hettinger added the comment:
This isn't worth introducing poorly thought out hacks.
--
___
Python tracker
<http://bugs.python.org/issue9276>
___
___
Raymond Hettinger added the comment:
Is there a way to test this?
--
___
Python tracker
<http://bugs.python.org/issue11335>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
I concur with Georg.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue11381>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
The patch looks fine. Please apply and backport.
Also, please search all other pop() methods in the standard library to see if
this bug occurred anywhere else. Popping from an empty container should be a
LookupError, either IndexError for sequences or
Raymond Hettinger added the comment:
s/has to be/could be/
But yes, this would be a worthwhile addition to MutableSequence :-)
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11
Raymond Hettinger added the comment:
Does Python 2.7 have an issue?
--
___
Python tracker
<http://bugs.python.org/issue11386>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
Please also update the table entry for MutableSequence in
Doc/library/collections.abc.rst
--
___
Python tracker
<http://bugs.python.org/issue11
Raymond Hettinger added the comment:
> My point was that unix hasn't found it useful
> to add a level option to the dirname API.
ISTM, that is a strong indication that this isn't needed in the form it has
been proposed.
> I don't know that I personally have ever had
New submission from Raymond Hettinger :
The section headings all look like this:
4.11. Other Built-in Types
4.11.1. Modules
...
http://docs.python.org/dev/library/stdtypes.html#classes-and-class-instances
It looks like there is one dot to many
Raymond Hettinger added the comment:
> This looks fine to me -- isn't it a mere stylistic issue?
It must be. I just checked several of the books on my shelf. Most don't have
the trailing period, but Knuth does. I raised the issue because I thought it
was
Raymond Hettinger added the comment:
In both cases, if-clause and the else-clause are at the beginning of the line
(from Python's point of view).
The difference is that the Python command line interpreter adds a "..." to the
beginning of secondary lines. That makes the else-
Raymond Hettinger added the comment:
Sorry, but I think many of these changes should not be made.
Sometime the tight spacing is used for visual grouping. The following look
fine and should not be changed because adding spaces around the + or * operator
makes the whole sentence harder to
Raymond Hettinger added the comment:
Sorry Eugene, but I'm not willing to add that much complexity to save a few
bytes. This was a known issue and long ago we choose to leave it as-is. In
the future when constant folding is done at the AST level, we'll get more
extensive optimiz
Raymond Hettinger added the comment:
I'm disinclined to accept this patch. There is only minor space savings and no
actual speed-up.
When constant folding was introduced, a design decision was made to ignore the
issue of orphan constants. The rationale behind that decision still s
Changes by Raymond Hettinger :
--
nosy: +twouters -rhettinger
___
Python tracker
<http://bugs.python.org/issue11462>
___
___
Python-bugs-list mailing list
Unsub
Raymond Hettinger added the comment:
Sorry Eugene. As the person who designed, implemented, and maintains the
peephole optimizer, I need to reject the patch.
If better constant folding is wanted, the work needs to be done with AST, not
with bytecode. I would welcome a patch.
Thomas
Raymond Hettinger added the comment:
Eugene's patch looks like a correct fix to the regression. I'll review further
in the next couple of days.
Antoine, we need to further discuss your checkin to the peephole optimizer. I
believe it was inappropriate.
--
assignee: mark
Raymond Hettinger added the comment:
Please cease development of this patch. It has been rejected.
The peephole optimizer should be considered somewhat off-limits at this point
and any further development efforts directed at an AST optimizer.
--
resolution: -> rejec
Raymond Hettinger added the comment:
I discussed this with Moshe today and he agreed that the document is
out-of-date and should be removed.
--
nosy: +moshez
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.p
Raymond Hettinger added the comment:
> We seem to be in the worst of both worlds right now
> as I've generated and stored a lot of json that can
> not be read back in
This is unfortunate. The dumps() should have never worked in the first place.
I don't think that loads(
Raymond Hettinger added the comment:
Georg, do you have a recommendation?
--
assignee: docs@python -> georg.brandl
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +dmalcolm, pitrou, rhettinger
priority: normal -> high
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
It looks like the steps for UNPACK_SEQUENCE should be skipped when following a
BUILD_SET. I'll post a patch tomorrow (probably a one-liner).
--
___
Python tracker
<http://bugs.python.org/is
Raymond Hettinger added the comment:
See attached.
--
keywords: +patch
Added file: http://bugs.python.org/file21208/peep.diff
___
Python tracker
<http://bugs.python.org/issue11
Raymond Hettinger added the comment:
Eugene, thanks for noticing and reporting this.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
The suggested examples are misleading because they use 6.24 which is not
exactly representable in binary floating point. Representation issues are
orthogonal to the OP's issue which is really just a simple rounding example:
>>> x =
Raymond Hettinger added the comment:
-1
I think this will make the code harder to understand and maintain.
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue11
Changes by Raymond Hettinger :
--
priority: normal -> low
versions: -Python 3.1, Python 3.2, Python 3.4
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
> Now the question is, is this a bug
> or would adding support be a feature?
That may be a good question for python-dev.
Since ConfigParser is a very old module,
if there were a pressing need, we probably
would have heard about it befo
Raymond Hettinger added the comment:
It's also a question of adding a feature to a point release. If dev's relied
on the new feature, they would also have to test for version > 2.7.1. We
usually try to avoid that (after a minor fiasco with booleans m
Raymond Hettinger added the comment:
+1
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue11602>
___
___
Python-bugs-list mailing list
Unsub
Raymond Hettinger added the comment:
It seems no new issues have arisen.
If something new comes-up, feel free to re-open.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Éric, would you like to apply this to 2.7?
--
assignee: rhettinger -> eric.araujo
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
I concur with the other respondants.
Also, experience has shown a near zero learning curve for sets. For whatever
reason, people seem to just get it and not require further explanation.
--
nosy: +rhettinger
Changes by Raymond Hettinger :
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue11205>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
> By the way, PyList_SetItem() already has an
> abstract counterpart called PyObject_SetItem(),
> so changing this one seems useless.
The problem isn't a lack of available abstract
functions. If some code uses PyObject_SetItem(),
then it alr
Raymond Hettinger added the comment:
I'm just pointing out a problem. Lots of existing code uses the concrete API
and that code can break subclasses of builtin types (possibly resulting in
segfaults).
I don't really care what is done about it. I'm just observing that the cur
Raymond Hettinger added the comment:
This looks fine, but it may be better to put the tables first and details
second.
--
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
Thanks for noticing this.
--
nosy: +rhettinger
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
I think this is a good idea.
Am not sure whether it should be backported though.
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11628>
___
___
Python-bugs-
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11625>
___
___
Python-bugs-
Raymond Hettinger added the comment:
This looks okay.
On the first lines for set_merge() where there is:
key = entry->key;
also do:
hash = entry->key;
so that the two get handled in a parallel fashion.
Thanks for doing the backporting.
--
assignee: rhettinger -> er
Changes by Raymond Hettinger :
--
assignee: rhettinger -> mark.dickinson
___
Python tracker
<http://bugs.python.org/issue11244>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
Thanks Daniel.
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Raymond Hettinger :
--
assignee: rhettinger ->
___
Python tracker
<http://bugs.python.org/issue11260>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
The revised patch looks good.
Please make the same change for set_add_entry.
If the tests run, go ahead and apply.
--
___
Python tracker
<http://bugs.python.org/issue8
Raymond Hettinger added the comment:
These are fine except for the changes to collections.py. Please leave the
deployed code for named tuple as-is. Doctest may have issues with trailing
whitespace, but that is doctest's problem, not named tuple's.
--
assignee:
Changes by Raymond Hettinger :
--
assignee: rhettinger ->
versions: +Python 3.3 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue1479611>
___
___
Py
Raymond Hettinger added the comment:
Fixed.
Thanks for the bug report.
--
resolution: -> fixed
status: open -> closed
versions: +Python 3.3 -Python 2.5, Python 2.6
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Sure, go ahead and apply to 3.1
--
___
Python tracker
<http://bugs.python.org/issue8420>
___
___
Python-bugs-list mailin
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10787>
___
___
Python-bugs-
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
versions: +Python 3.1, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/i
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
versions: +Python 2.7, Python 3.1, Python 3.3
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Looks good.
Can this be closed now?
--
___
Python tracker
<http://bugs.python.org/issue8420>
___
___
Python-bugs-list mailin
Changes by Raymond Hettinger :
--
assignee: rhettinger ->
___
Python tracker
<http://bugs.python.org/issue7391>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10978>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
priority: normal -> low
versions: +Python 3.3 -Python 2.6, Python 3.0
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
I no longer have access to the compiler that emitted the warning.
--
resolution: -> out of date
status: open -> closed
title: Compiler warning "signed/unsigned comparion in mmapmodule" -> Compiler
warning "signed/unsigned
Raymond Hettinger added the comment:
Interesting, the Content-Length header was sent twice:
HTTP/1.1 200 OK
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sat, 07 Feb 2009 19:15:15 GMT
ETag: "46aef-46258f510b6c0"
Content-Length: 289519
Expires: Fri, 25 Mar 2011 17:32:49 GMT
Co
Changes by Raymond Hettinger :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue11477>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Thanks for the report. It looks like globals() contamination is happening on
the buildbot that isn't happening locally.
Isolated the test in commit 4f1cd92fe835
Will check the buildbots after to make sure it worked. Otherwise, will delete
Raymond Hettinger added the comment:
> I am curious, what was the reason to add
> trailing whitespace in the named tuple template?
To make it hard to doctest ;-)
I had a thought that it made the template more readable, but the better
solution was to just use real newlines instead
New submission from Raymond Hettinger :
Teach pydoc to find methods and attributes with leadings underscores in a named
tuple.
--
components: Library (Lib)
files: pydoc.patch
keywords: patch
messages: 132055
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Test
Raymond Hettinger added the comment:
I don't think this is worthy of being in whatsnew.
Feel free to update the other docs though.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Raymond Hettinger :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11071>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
title: Test pydoc to display full help for named tuples -> Teach pydoc to
display full help for named tuples
___
Python tracker
<http://bugs.python.or
Raymond Hettinger added the comment:
A certain amount of exception masking is inherent is Python's design. We use
TypeError for a lot of things, including the exception raised by "len(obj)"
when obj doesn't have length.
It may be possible to replace the TypeError check
Changes by Raymond Hettinger :
--
priority: normal -> low
versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
> Which also makes me think that Python's exceptions are,
> maybe, too coarse sometimes.
I agree :-)
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.pyth
New submission from Raymond Hettinger :
The current __repr__ for structseq only shows the name/value pairs for the
positional part and it ignores the other named fields.
For example, os.stat(somefile) returns:
posix.stat_result(st_mode=33277, st_ino=8468407, st_dev=234881026, st_nlink=1
New submission from Raymond Hettinger :
For cases where the underlying comparison function is in C (strcoll for
example), the pure Python dispatch in cmp_to_key dominates running time. This
can be reduced considerably by writing cmp_to_key in C, making its overhead as
low or lower than the
Raymond Hettinger added the comment:
Eugene, I think you're doing great work here and would like to see you succeed.
In the near term, I don't have time to participate, but don't let that stop
you.
--
___
Python tracker
<http
Changes by Raymond Hettinger :
--
assignee: docs@python -> rhettinger
nosy: +rhettinger
priority: normal -> low
___
Python tracker
<http://bugs.python.org/i
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue11713>
___
___
Pyth
Raymond Hettinger added the comment:
There's no need to guess what it does ;-) We don't document by experiment when
source and test suites are available.
Mathew was correct, it works as documented: the key function is applied at
the outset (as it always does) and then cmp f
New submission from Raymond Hettinger :
The open-module command is a fast effective way to examine source code
regardless of where it sits on sys.path; however, it gets lost when seeking a
package name. Instead of aborting, it could bring-up the __init__.py file.
For example, "open-m
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11713>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Thank you.
--
___
Python tracker
<http://bugs.python.org/issue11712>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue11726>
___
___
Python-bugs-list mailing list
Un
Changes by Raymond Hettinger :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue11729>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raymond Hettinger added the comment:
Thanks for the feature request. Py3.3 is a long ways away, so I'll leave this
open for a while.
Comments in favor:
* Precedent with Smalltalk bags that know their total length
Comments against:
* sum(c.values()) is trivial to write
* fattening th
Raymond Hettinger added the comment:
> It would be interesting to have Counter.elements_count()
> if it has a complexity of O(1): if the collections
> maintains a total (in a private attribute).
I agree that it would be interesting; however, it would be an implementation
disaster.
Raymond Hettinger added the comment:
Am going to close this one because I don't see any straight-forward way around
it and because it's technically not a bug (just an undesirable design
artifact). The use of TypeError for objects that don't define __len__ is
deeply ingrained
Changes by Raymond Hettinger :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11661>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Nice work. There are a few nits (dealloc and traverse need to address both
python objects in the struct). I will look at the patch in detail when I get a
chance (in the next week or so).
It would be great if more tests were added (in general, C
Raymond Hettinger added the comment:
Filip, can you please submit a contributor agreement?
http://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement
--
___
Python tracker
<http://bugs.python.org/issue11
Raymond Hettinger added the comment:
It probably would have been okay to remove assertDictContainsSubset which had
nearly zero uptake (according to Google's code search). That's probably
because it addresses an uncommon use case, because it was only recently
introduced, and b
Raymond Hettinger added the comment:
FWIW, the PSF is working towards getting electronic signatures for contributor
agreements. In the mean time, a scan or photo would work just fine.
--
___
Python tracker
<http://bugs.python.org/issue11
Raymond Hettinger added the comment:
See also: issue11756
--
nosy: +rhettinger
versions: +Python 3.3 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue9
Raymond Hettinger added the comment:
I was only aiming for Py3.3.
If someone wanted to push for a backport to 3.2, it would be up to the release
manager to decide whether a performance booster would be worth the risk of
introducing a bug in a point release.
ISTM that if someone really
Raymond Hettinger added the comment:
I'm working on cleaning-up (and speeding-up) the patch. I'll post new timings
once that's done.
--
___
Python tracker
<http://bugs.pyt
701 - 800 of 9609 matches
Mail list logo