Raymond Hettinger added the comment:
Daniel, do you have time to work on this one?
If so, go ahead an make setobject.c accept any instance of collections.Set and
make the corresponding change to the ABCs:
def __or__(self, other):
if not isinstance(other, Set):
return
Raymond Hettinger added the comment:
No need to rush this for the beta. It's a bug fix and can go in at any time.
The important thing is that we don't break the C code. The __ror__ magic
method would still need to do the right thing and the C code needs to defend
against the i
New submission from Raymond Hettinger :
Nick, I may have found a straight-forward way to incorporate your idea for the
cache to support maxsize=None. Let me know what you think.
--
assignee: ncoghlan
components: Library (Lib)
files: cache.diff
keywords: patch
messages: 122967
nosy
Changes by Raymond Hettinger :
Added file: http://bugs.python.org/file19887/cache2.diff
___
Python tracker
<http://bugs.python.org/issue10593>
___
___
Python-bugs-list m
Changes by Raymond Hettinger :
Removed file: http://bugs.python.org/file19886/cache.diff
___
Python tracker
<http://bugs.python.org/issue10593>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
Attaching a rough concept of how to make the existing pprint module extendible
without doing a total rewrite. The actual handler is currently bogus (no
thought out), so focus on the @guard decorator and the technique for scanning
for handlers
Raymond Hettinger added the comment:
Applied in r86911.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
I'll discuss with Benjamin. This could be construed as a simple bug fix. The
code is already in Py3.1.
Line 155:
- items = _sorted(object.items())
+ items = (list if issubclass(typ, OrderedDict) else _sorted)(object.items())
--
ass
Raymond Hettinger added the comment:
This is fine. Go ahead and backport if you feel so inclined.
--
assignee: d...@python -> eli.bendersky
nosy: +rhettinger
priority: normal -> low
resolution: -> accepted
versions: -Python 2.6
___
Pytho
Raymond Hettinger added the comment:
Note, the :attr:`~Option.dest` variable is a list which includes default
values if any are defined. Options on the command-line are appended to
this list. Accordingly, the list may contain both the default value and
the value passed on the command-line
Raymond Hettinger added the comment:
Thanks. This nice, clean diff is much more reviewable and it looks like what I
expected.
The use of Py_LOCAL_INLINE is new to me since we usually use #define instead,
but this has a cleaner look to it. I am unclear on whether all the our target
Raymond Hettinger added the comment:
Just for the record, I wanted to highlight how little room there is for
optimization here. The sort wrapper is *very* thin:
sortwrapper_richcompare(sortwrapperobject *a, sortwrapperobject *b, int op)
{
if (!PyObject_TypeCheck(b, &PySortWrapper_
Raymond Hettinger added the comment:
AP: I've already given my blessing to the patch.
Just wanted to note what the existing code did.
I also trust timings but recognize that they
reflect a particular build configuration
(compiler/processor/o.s)and the usage pattern
for a particular benc
Raymond Hettinger added the comment:
If this change were important, the numpy/scipy guys would have requested it
long ago. Any possible benefit would be slight and not at all worth the
disruption.
s.replace('j', 'i')
Raymond Hettinger added the comment:
Since we have two distinct user groups (engineers and everyone else), it's
clear that we should fork Python. That would let each group work with their on
most-natural-representation and it would prevent unnecessary configuration
challenges.
Ben
Raymond Hettinger added the comment:
> Can you now implement the letter 'i' to act as an
> imaginary unit? Is that possible?
Yes, it's possible; however, the developers do not think it is worthwhile.
> If it's possible in MATLAB, why not have both 'j'
Raymond Hettinger added the comment:
Try not to sprawl this all over the docs. Find the most common root and
document it there. No need to garbage-up Fractions, Decimal etc. with
something that is of zero interest to 99.9% of users.
--
nosy: +rhettinger
Raymond Hettinger added the comment:
Try not to twist yourself in a knot over this.
I'll be happy to review in proposed doc patch.
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg123190
___
Python tracker
<http://bugs.python.org/issue10610>
___
___
Python-bug
Raymond Hettinger added the comment:
Let me know when you have a proposed doc patch. Ideally, the details should
just be in one place and we can refer to it elsewhere. We don't want to add
extra info to every function or method in Python that uses int(s) and gets
extra unicode digi
Changes by Raymond Hettinger :
--
nosy: -rhettinger
___
Python tracker
<http://bugs.python.org/issue10562>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
keywords: +easy -patch
___
Python tracker
<http://bugs.python.org/issue10516>
___
___
Python-bugs-lis
Raymond Hettinger added the comment:
Yes, someone went nuts with renumbering. That is allowed but was probably
unnecessary.
That being said, users of opcodes should really use the names in opcode.py
instead of the numbers themselves.
--
nosy: +rhettinger
Raymond Hettinger added the comment:
Nothing will happen on this until 3.2 is done and the py3k branch starts with
3.3 submissions.
--
resolution: -> later
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
--
assignee: -> rhettinger
nosy: +rhettinger
priority: normal -> low
versions: +Python 3.3 -Python 3.2
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Thanks for the patch. I had looked at this long ago when I first added the
ROT2 optimization and the ROT3/ROT2 optimization. It wasn't included because
it wasn't worth the added complexity in the peepholer logic and because there
were conc
Raymond Hettinger added the comment:
I'll take that section out.
--
assignee: d...@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.or
Raymond Hettinger added the comment:
Thanks for the patch.
FWIW, I'm attaching some timing code that I've used in the past.
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.pytho
Changes by Raymond Hettinger :
Added file: http://bugs.python.org/file19993/time_counter.py
___
Python tracker
<http://bugs.python.org/issue10667>
___
___
Python-bug
Raymond Hettinger added the comment:
I concur with David Murray. Usually you care about the specific value changed
to, not whether it changed at all. The changed-by variant is even more
specialized and you're better of using assertEqual since you know what the new
value is supposed
Raymond Hettinger added the comment:
Thanks for submitting the idea though.
Perhaps, post it on the ASPN Cookbook
or on the newsgroup to see if others
are interested.
--
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
Applied in r87162
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue2690>
___
___
Python-bugs-lis
Raymond Hettinger added the comment:
I would like this API to "sit and cook" for a good while. There are many
possible ways to add more methods and most be end-up being YAGNI.
Also, my experience with dict.fromkeys() is that a fair number of people get
confused by alternative co
Raymond Hettinger added the comment:
Is the in/not-in fast path in 2.7?
--
___
Python tracker
<http://bugs.python.org/issue2690>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
The current behavior for function definitions is beneficial because a trailing
comma in the argument list is likely to signal a real error (omitted variable).
In contrast, the trailing comma for lists is useful because entries on separate
lines in a
Raymond Hettinger added the comment:
+1 on this feature request
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue9234>
___
___
Python-bug
Raymond Hettinger added the comment:
Yes, if you have a chance to think it through, it would be nice to get this
fixed-up.
--
assignee: -> stutzbach
versions: -Python 3.1
___
Python tracker
<http://bugs.python.org/iss
Raymond Hettinger added the comment:
Attaching a new patch for high-speed update() and __init__(). I also tried a C
version of __missing__() but the speed-up was too small to be worth it.
--
resolution: later ->
stage: -> patch review
versions: +Python 3.2 -Python 3.3
Adde
Raymond Hettinger added the comment:
Fixed "if(" spacing and applied in r87265.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.py
Raymond Hettinger added the comment:
Georg, I believe this should go in 3.2.
The alias capability is an essential part
of what subparsers are all about and
these absence of aliases would leave them
partially crippled (i.e. unable to emulate
the likes of svn blame/annotate/praise).
Please
Raymond Hettinger added the comment:
This should get fixed-up before the second beta.
Try to confirm the most common argument ordering using Google's code search to
ascertain actual practice in real code.
FWIW, I also tend to use actual/expected and find the reverse to be a form
Yoda-
Changes by Raymond Hettinger :
--
assignee: -> skip.montanaro
___
Python tracker
<http://bugs.python.org/issue10515>
___
___
Python-bugs-list mailing list
Un
Raymond Hettinger added the comment:
FWIW, whatsnew is not primary documentation -- it should not be the sole or
central source of anything except a highlevel overview and examples for the
author's choice of selected version differences to highlight.
A howto document would work best
Changes by Raymond Hettinger :
--
assignee: -> effbot
nosy: +effbot
___
Python tracker
<http://bugs.python.org/issue10605>
___
___
Python-bugs-list mai
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg122983
___
Python tracker
<http://bugs.python.org/issue10592>
___
___
Python-bug
Changes by Raymond Hettinger :
--
versions: +Python 3.3 -Python 2.7
___
Python tracker
<http://bugs.python.org/issue10592>
___
___
Python-bugs-list mailin
Raymond Hettinger added the comment:
The two principals on the two argument parsing modules both find this
unnecessary.
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
New submission from Raymond Hettinger :
This is a straight-forward project.
Pydoc currently generated 1990's style html which mixes content and
presentation, making it very difficult for users to customize the appearance of
the output.
It is full of html like:
%s%s
'&
Raymond Hettinger added the comment:
I'm looking for a deeper fix, all the in-line styling replaced by a stylesheet.
Can you guys work together on bring this to fruition?
--
___
Python tracker
<http://bugs.python.org/is
Raymond Hettinger added the comment:
A good procedure is to start afresh with an empty, embedded style sheet and
replace the html styling attributes one at a time, while keeping the overall
look and feel the same. At the end of the process the embedded style sheet
can be converted to
Raymond Hettinger added the comment:
The uploaded stylestyle is *much* bigger than I expected. There should be no
more than a one-to-one correspondence. With inheritance, perhaps even fewer
entries.
--
___
Python tracker
<http://bugs.python.
New submission from Raymond Hettinger :
Nick, can you look at this?
--
assignee: ncoghlan
components: Library (Lib)
files: sized_cache.diff
keywords: patch
messages: 124194
nosy: ncoghlan, rhettinger
priority: normal
severity: normal
status: open
title: Better cache instrumentation
type
Raymond Hettinger added the comment:
Updated to use ABCs but still relies on user objects implementing __sizeof__.
So it is accurate whenever sys.getsizeof() is accurate.
--
Added file: http://bugs.python.org/file20095/sized_cache2.diff
___
Python
Raymond Hettinger added the comment:
Another thing to work out: not double counting duplicate objects:
[1000, 2000, 3000] is bigger than [None, None, None]
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issu
Changes by Raymond Hettinger :
Removed file: http://bugs.python.org/file20095/sized_cache2.diff
___
Python tracker
<http://bugs.python.org/issue10725>
___
___
Python-bug
Raymond Hettinger added the comment:
Closed due to lack of interest.
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Steven, can you go ahead and apply this?
--
___
Python tracker
<http://bugs.python.org/issue9234>
___
___
Python-bugs-list m
Raymond Hettinger added the comment:
These three changes look fine.
The argument order for assertDictContainsSubset is problematic (doesn't match
its own name and doesn't match the order for other __contains__ methods
elsewhere in Python), but it's too late t
Raymond Hettinger added the comment:
There's no rush on this one.
There desired properties are:
* separate content from presentation
* validated CSS and HTML
* simple CSS so that people can *easily* customize it
* possibly offer two premade stylesheets
1) a default beautiful one
2) on
Raymond Hettinger added the comment:
ISTM the whole point of an Abstract Syntax Tree is to express semantics while
throwing away the syntax details. The only reason any position information is
kept is to support tracebacks and debugging.
Perhaps the OP's request should changed to
Raymond Hettinger added the comment:
If info fields are added, they need to be optional so that someone manipulating
the tree (adding, rearranging, or removing nodes) doesn't have an additional
burden of supplying this info before compiling into an executable code o
Raymond Hettinger added the comment:
I agree that the "owner" terminology imprecise.
Will work on a doc fix when I get chance.
--
assignee: d...@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.pytho
Raymond Hettinger added the comment:
I agree with the OP that we need a way to either suppress chaining or have it
turned-off by default. A person writing an exception handler should have
control over what the user sees.
--
nosy: +rhettinger
Raymond Hettinger added the comment:
Can we at least offer an optional choice of encoding?
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
Many of these kind of "decisions" were made quickly, haphazardly, and with
almost no discussion and were made by contributors who were new to Python core
development (no familiar with the API norms).
Given the rats nest of bytes/text problems in
Raymond Hettinger added the comment:
A possible answer to "why is this encoding at all" was probably to make it
easier to transition code from python 2.x where strings were usually ascii and
it would make no difference in output if encoded in utf-8. The 2-to-3 fixer
was good a
Raymond Hettinger added the comment:
Errors should not pass silently :-)
Given the buggy behavior, we have several options including just removing the
implicit conversion and going back to bytes only.
--
___
Python tracker
<http://bugs.python.
Raymond Hettinger added the comment:
>> At this point a feature change seems unlikely,
Amaury, it is not too late to fix anything that's broken. New features are
out, but we are free to fix anything hosed this badly.
--
___
Python tra
Raymond Hettinger added the comment:
> using `None` as the cause of an exception would be the
> best solution in my opinion:
+1
--
___
Python tracker
<http://bugs.python.org/
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10787>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
The improved output format in 3.2 still needs to be backported to 2.7.
--
priority: normal -> low
versions: -Python 3.2
___
Python tracker
<http://bugs.python.org/issu
Raymond Hettinger added the comment:
This is an implementation detail specific to CPython and subject to change.
I'm -1 on documenting it for every function/method and thereby making it part
of the language spec. We've lived without this spec for almost twenty years, so
I
Raymond Hettinger added the comment:
I concur that the one warning is enough. Implementations have been given wide
latitude in this regard. Even within CPython there is not much uniformity --
some funcs/methods don't accept keywords, some will disregard keywords, and
others may
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10813>
___
___
Python-
Raymond Hettinger added the comment:
Here's a code search link:
http://www.google.com/codesearch?as_q=PyMapping_Check
And here's how it currently used internal to the Python codebase:
$ ack --cc PyMapping_CheckInclude/abstract.h
1125: PyAPI_FUNC(int) PyMapping_Check(P
Raymond Hettinger added the comment:
Applied in r87783.
--
nosy: +rhettinger
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
I think I prefer the code as-is. If you need to blank out the decimal point,
set dp to the empty string.
--
___
Python tracker
<http://bugs.python.org/issue10
Raymond Hettinger added the comment:
Rather than introduce "fixes" that break code and hurt performance, I think it
would be better to deprecate PyMapping_Check() and wait for a fast, clean C
version of the ABCs (that is supposed to be our one obvious way to do it).
FWIW, the s
Raymond Hettinger added the comment:
> Do you also advocate deprecating PySequence_Check()?
Perhaps just document PyMapping_Check() as being less informative than before
(now it has false positives for sequences).
> As for the "clean C version of the ABCs",
> I'm af
Raymond Hettinger added the comment:
-0 we don't backport new features
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10849>
___
___
Changes by Raymond Hettinger :
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue10813>
___
___
Python-bugs-list mailing list
Unsubscri
Raymond Hettinger added the comment:
2.6 is right out.
Martin, would you please decide on whether this should be backported to 2.7 and
3.1? IMO, the rationale is flimsy (its not hard to run the test suite in
*any* version) and it goes against our usual policy; however, it is also a
Raymond Hettinger added the comment:
His +0 isn't a decision. I would like Martin, the longest term active
developer, to make the call about waiving the policy of not backporting
features (especially when the only purported benefit saving a couple of core
devs from spelling out the
Changes by Raymond Hettinger :
--
assignee: d...@python -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10858>
___
___
Python-bugs-list mai
Raymond Hettinger added the comment:
Please leave these alone for the time being. I put them high on the page so
that people would have a consistent and easy to find view-source link. It is
an experiment and time will tell whether it was a good choice. For the time
being, I don't wa
Raymond Hettinger added the comment:
Thanks for the report and patch.
Fixed. rSee 87853.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Raymond Hettinger :
--
Removed message: http://bugs.python.org/msg125757
___
Python tracker
<http://bugs.python.org/issue10042>
___
___
Python-bug
Raymond Hettinger added the comment:
Thanks for the report and patch.
Fixed. See r87853.
--
___
Python tracker
<http://bugs.python.org/issue10042>
___
___
Pytho
Raymond Hettinger added the comment:
See r87856
--
resolution: -> accepted
status: open -> closed
type: -> feature request
versions: +Python 3.2
___
Python tracker
<http://bugs.python.or
Raymond Hettinger added the comment:
See r87858.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10533>
___
__
Raymond Hettinger added the comment:
See r87862.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9717>
___
__
Changes by Raymond Hettinger :
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10648>
___
___
Python-bugs-
Raymond Hettinger added the comment:
Clarified what it means to be a mapping in r87871 and r87872.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
+1
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10868>
___
___
Python-bugs-list mailing list
Unsub
Raymond Hettinger added the comment:
Removed the wordy and bright yellow boxes.
Replace with single source link just below the section heading.
Style modeled after that used in the Go language docs
http://golang.org/pkg/container/heap/
See r87898.
--
resolution: -> fixed
sta
Raymond Hettinger added the comment:
Fixed in r87899.
Thanks for the patch
and attention to detail.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Raymond Hettinger added the comment:
Terry, I'm unhappy with the changes to the sorting how-to. IMO, it was a not a
net win (transforming code that already ran fine in something doctest would
swallow). The code snippets now have the visual clutter of the ">>>" and &q
Raymond Hettinger added the comment:
You're welcome to discuss this with me on IRC at some point. For now, the
important thing is that I put a good deal of time and effort working on the
sorting howto and I like it as it stands (your notions of precedent or
consistency not withsta
Changes by Raymond Hettinger :
--
assignee: belopolsky -> rhettinger
___
Python tracker
<http://bugs.python.org/issue10225>
___
___
Python-bugs-list mai
Changes by Raymond Hettinger :
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue9124>
___
___
Python-bugs-list mailing list
Unsubscri
1001 - 1100 of 9609 matches
Mail list logo