Re: [Python-Dev] best practices stdlib: purging xrange

2007-05-07 Thread Raymond Hettinger
ery effort to make sure that Py3k doesn't unnecessarily backpropagate into an otherwise very stable codebase. An unwarranted s/xrange/range/g would be just one more reason to not upgrade to Py2.6. Raymond ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] New operations in Decimal

2007-05-10 Thread Raymond Hettinger
I question the sanity of the spec writers in this case, I do trust that overall, they have provided an extremely well thought-out spec, have gone through extensive discussion/feedback cycles, and have provided a thorough test-suite. It is as good as it gets. Ray

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Raymond Hettinger
ility bug)" If I still have any say in the matter, please consider this a pronouncement. Tim, if you're listening, please chime in. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] New operations in Decimal

2007-05-11 Thread Raymond Hettinger
. The logical operations are there for environments where decimal is the only available numeric type. IIRC, this is how Rexx works with decimal implemented around strings where what you type is what you get. Raymond ___ Python-Dev mailing list P

[Python-Dev] Py2.6 buildouts to the set API

2007-05-18 Thread Raymond Hettinger
callback(s): print 'Set %d now has %d items' % (id(s), len(s)) s.listeners.append(callback) s.add(existing_element) # no callback s.add(new_element) # callback Raymond ___ Python-Dev mailing list Python

Re: [Python-Dev] Py2.6 buildouts to the set API

2007-05-19 Thread Raymond Hettinger
#x27;m not sure I see how to make it work. If s|t returned an iterator, then how would s|t|u work? Are you proposing lazy evaluation of unions, intersections, and differences? Raymond ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-06 Thread Raymond Hettinger
nicode encodings and other other transformations (uu, zlib, bz2, quopri, etc)? FWIW, transform()/untransform() are already in the 3.2 beta. Do you want them taken out? If so, do you want the codecs made accessible with encode/decode or have them continue to be inaccessible in 3.x? R

Re: [Python-Dev] Repo frozen for 3.2

2010-12-06 Thread Raymond Hettinger
der or rework some of the new features (such as transform/untransform). Raymond P.S. We really ought to stop with the SafeFoo naming convention. It is only descriptive to the person who wrote the class or function, not to the user who will immediately wonder, "safe from what?" Safe can

Re: [Python-Dev] Repo frozen for 3.2

2010-12-06 Thread Raymond Hettinger
On Dec 6, 2010, at 11:40 AM, Fred Drake wrote: > On Mon, Dec 6, 2010 at 2:21 PM, Raymond Hettinger > wrote: >> We really ought to stop with the SafeFoo naming convention. >> It is only descriptive to the person who wrote the class or function, >> not to the user who

Re: [Python-Dev] futures API

2010-12-09 Thread Raymond Hettinger
de is short and readable. From my quick read, it looks to be a relatively thin wrapper/adapter around existing tools. Most of the work still gets done by the threads or processes themselves. Think of this as a cleaner, more centralized API around the current toolset -- there is no deep new tec

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Raymond Hettinger
> callable(max) >> + True >> + >>> callable(20) >> + False > > Placeholder example? > Trivial function begets a trivial example :-) If you think it warrants more, I'm open to suggestions. Raymond _

[Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Raymond Hettinger
se() just so they could match the built-in API. It's time for swapcase() to go the way of the dinosaurs. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.or

[Python-Dev] API for the new sysconfig module

2010-12-09 Thread Raymond Hettinger
Does anyone know why this needed a separate module and so many accessor functions? ISTM it mostly could have been reduced to single call returning a nested dictionary. Raymond from sysconfig import * import json def sysconf(): return dict(paths = get_paths(), config_vars

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Raymond Hettinger
ccessor functions living in a new module. Tastes may vary on writing getter functions for every category of interest but we did not need a whole new module for this. The referenced email didn't indicate much if any thought about the API design, so I think should get that thought now. If those

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Raymond Hettinger
On Dec 10, 2010, at 12:56 PM, Antoine Pitrou wrote: > On Fri, 10 Dec 2010 12:27:26 -0800 > Raymond Hettinger wrote: >> >> IMO, sysconfig did not warrant a whole module. > > Where would you put it? A single function in the sys module. > >> Rather than usi

Re: [Python-Dev] API for the new sysconfig module

2010-12-11 Thread Raymond Hettinger
12/10/2010 4:59 PM, R. David Murray wrote: >>>> >>>>> Like Éric, I'm not sure what the implications of the existing module >>>>> having been released in 2.7 and 3.2 beta are in terms of making such an >>>>> API change. >>>> >

Re: [Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuation

2010-12-13 Thread Raymond Hettinger
than a deliberate comma-for-the-future. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuation

2010-12-13 Thread Raymond Hettinger
On Dec 13, 2010, at 2:16 PM, Guido van Rossum wrote: > On Mon, Dec 13, 2010 at 1:55 PM, Raymond Hettinger > wrote: >> >> It seems to me that a trailing comma in an argument list is more likely to >> be a user error than a deliberate comma-for-the-future. > >

Re: [Python-Dev] configparser 1.1 - one last bug fix needed

2010-12-14 Thread Raymond Hettinger
On Dec 14, 2010, at 3:38 AM, Fred Drake wrote: > On Tue, Dec 14, 2010 at 6:24 AM, Steven D'Aprano wrote: >> The good thing about that idea is that maintenance of buggy.py will be so >> simple! > > It's self-describing, and needs no further documentation. :-) > And psychologically more effect

Re: [Python-Dev] r87389 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py Misc/NEWS

2010-12-19 Thread Raymond Hettinger
x27;a' stands for 'after' and 'b' for 'before', right? :-) If you go down the a / b path instead of actual/expected, the diffs are straight-forward but some of the other output styles needed to be changed also (replace the messages for "unexpect

Re: [Python-Dev] r87389 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py Misc/NEWS

2010-12-24 Thread Raymond Hettinger
not it x" The notion of "making symmetric" can easily get carried too far, which a corresponding loss of useability. You get 95% of the benefit from two small changes: * Change the parameter names from "actual" and "expected" to "f

Re: [Python-Dev] nonlocal x = value

2010-12-27 Thread Raymond Hettinger
ases aren't worth breaking the rules. And the purported goal (saving one line) isn't much of a payoff. * The language moratorium is ending but the aversion to non-essential micro-syntax changes persists. * And, Georg doesn't like it :-) Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Started my PSF core grant today

2011-01-04 Thread Raymond Hettinger
rting Python 2 code to Python 3. If I have time left over > it will be spent on the test suite. Woohoo. Nice to have you working on these tasks. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyth

Re: [Python-Dev] PEP 3333: wsgi_string() function

2011-01-06 Thread Raymond Hettinger
people's first chance to hear the outcome of the multi-year discussion. Thanks, Raymond On Jan 6, 2011, at 3:50 PM, And Clover wrote: > On Tue, 2011-01-04 at 03:44 +0100, Victor Stinner wrote: >> What is this horrible encoding "bytes-as-unicode"? > > It is a unicode s

Re: [Python-Dev] What's new 2.x in 3.x docs.

2011-01-22 Thread Raymond Hettinger
ng them takes away a resource and gains nothing. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Keeping __init__.py empty for Python packages used for module grouping.

2011-01-24 Thread Raymond Hettinger
that if we're going to use python packages as "namespace containers" for categorizing modules, then the top level __init__ namespace should be left empty. Before the placement of html.escape() becomes set in stone, I think we should consider putting it somew

[Python-Dev] Location of tests for packages

2011-01-24 Thread Raymond Hettinger
ll be hard to undo. I recommend moving it under Lib/test before everything is set in stone. Raymond P.S. I've discussed this with Michael and his preference is against going back to the Py3.1 style where the tests were under Lib/test. He thinks the current tree makes it easier to sync

Re: [Python-Dev] Location of tests for packages

2011-01-24 Thread Raymond Hettinger
On Jan 24, 2011, at 3:40 PM, Michael Foord wrote: > It isn't just unittest, it seems that all *test packages* are in their > respective package and not Lib/test except for the json module where Raymond > already moved the tests: > >distutils/tests >emai

Re: [Python-Dev] fcmp() in test.support

2011-01-28 Thread Raymond Hettinger
ogether, or added to unittest if it's still deemed >> important. >> >> +/- ? > > I say drop it if it can be done so safely. Yes, please remove fcmp() altogether. Like you said, the usage is trivial. If you're feeling bold, replace them with assertEqual(), the tests l

Re: [Python-Dev] Finally fix installer to add Python to %PATH% on Windows

2011-01-28 Thread Raymond Hettinger
ve helped quite a few "python newbies" on Windows who are also surprised / > frustrated on learning that "python" on the command line doesn't work after > installing python. At the very least, we should add some prominent instructions for getting the command

Re: [Python-Dev] [Python-checkins] r88273 - python/branches/py3k/Doc/whatsnew/3.2.rst

2011-01-30 Thread Raymond Hettinger
On Jan 30, 2011, at 8:21 PM, eli.bendersky wrote: Please use the open tracker item and do not edit the document directly. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] 3.2.0

2011-02-16 Thread Raymond Hettinger
say 3.2.0 but I'm opposed to changing anything in the release at this point. We have some real bugfixes that we're delaying until 3.2.1, so why would we make an exception for a non-essential changes such as this. Raymond ___ Python-D

Re: [Python-Dev] svn outage on Friday

2011-02-22 Thread Raymond Hettinger
e same thing yesterday when viewing with the Chrome browser but it looked fine on Firefox. Later, after restarting the browsers the problem disappeared. I wonder if there was some sort of caching issue. Raymond ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Mercurial conversion repositories

2011-02-24 Thread Raymond Hettinger
fort you put in. I'll do some tests today. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Mercurial conversion repositories

2011-02-25 Thread Raymond Hettinger
they were separate, it would complicate backporting patches and merges. So, I'm happy with how George and Benjamin put this together. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

Re: [Python-Dev] set iteration order

2011-02-26 Thread Raymond Hettinger
be totally random from your (the programmer's) > POV. I concur with Antoine. Also, it wasn't the iteration order that changed; sets still iterate in the same order. What changed was the algorithm for creating a new set using a set difference operation. Raymond __

Re: [Python-Dev] r88676 - peps/trunk/pep-0385.txt

2011-02-28 Thread Raymond Hettinger
;> I really meant superfetatory (it's slightly different: superfluous is >> simply useless, while superfetatory implies that it's in excess). > > Maybe "supernumerary" serves? Plain, everyday English would serve better than using words which people need to look

Re: [Python-Dev] Official Roadmap (Re: Let's get PEP 380 into Python 3.3)

2011-03-03 Thread Raymond Hettinger
or the link. Their roadmap made my day: High priority: code to spawn spiders in the forest Medium priority: write pet rat fetch quest And best of all, the "animate rat" task is assigned to "Musk of Ephesus". Raymond ___ Python

Re: [Python-Dev] .hgignore (was: Mercurial conversion repositories)

2011-03-05 Thread Raymond Hettinger
mmitted, shouldn't the >> check go in a pre-commit hook instead? > > Well, it's more user-friendly to help "hg addremove" work as expected, > rather than add hooks down the line to forbid pushing any mistakes. I concur. Raymond _

[Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-11 Thread Raymond Hettinger
Today, there was a significant check-in to the peephole optimizer that I think should be reverted: http://hg.python.org/cpython/rev/14205d0fee45/ The peephole optimizer pre-dated the introduction of the abstract syntax tree. Now that we have an AST, the preferred way to implement

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-11 Thread Raymond Hettinger
for wanting to optimize, but think your efforts are misdirected and that you should be taking some advice from the guy who wrote thing in the first place. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listin

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-12 Thread Raymond Hettinger
it, when a better and more reliable approach exists? The patch hasn't even been demonstrated to be necessary in any real-world code. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-12 Thread Raymond Hettinger
I would like to withdraw my suggestion for the recursive constant folding patch to be reverted. I value social harmony much more than a decision about whether a particular patch is a good idea. I apologize to anyone who is upset over the discussion. Raymond

Re: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)

2011-03-12 Thread Raymond Hettinger
2 should be substantially better in this regard. It no longer wraps key objects around every input. Instead, it sorts two parallel arrays of pointers. You can thank Daniel Stutzbach (another Googler I believe) for this effort. Raymond ___ Python-Dev

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Raymond Hettinger
On Mar 13, 2011, at 7:41 PM, Tim Lesher wrote: > [I mentioned this to Raymond Hettinger after his PyCon talk, and I > promised a bug and hopefully a patch. I don't see an obvious solution, > though, so I'll ask here first.] Just make a tracker entry and assign it to me. I

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-15 Thread Raymond Hettinger
d or cared about since the introduction of named tuples a few years ago or since the publication of its recipe in years prior to that. Raymond P.S. There are other ways like creating an abstract base class to identify a class as having underscored names that aren't private (like _from_iter

Re: [Python-Dev] Module version variable

2011-03-16 Thread Raymond Hettinger
lower). Existing code in the field > tests this version attribute, so I don't think it should be deleted. The version number in the decimal module refers to the version of the spec that is being complied with. I would like that version number to remain in the module. There are probably other

Re: [Python-Dev] Please retract my committer rights

2011-03-16 Thread Raymond Hettinger
do, and > I won't be able to contribute anymore (I have not even started to > learn mercurial yet). Plus I'm still using 2.6 or even 2.5 with my own > Python projects. > > Goodbye. You will be missed. Thanks for all your efforts. Raymond

[Python-Dev] Hg: inter-branch workflow

2011-03-16 Thread Raymond Hettinger
hink the more complex workflow if worth it. Mercurial is very user friendly right out of the box will simple commands. But as soon as you require the branches to be inter-linked, you've made it much more difficult to get simple checkins done. Raymond

Re: [Python-Dev] API deprecations in Python 3, from a Python 2 perspective

2011-03-17 Thread Raymond Hettinger
ked with py3k warnings in Py2.7 point releases. That would give users the maximum chance to make updates before porting, even if they wait five years to migrate to Py3.x. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] I am now lost - committed, pulled, merged, what is "collapse"?

2011-03-19 Thread Raymond Hettinger
#x27;re going to have to expect a lot of questions. And those questions shouldn't be brushed-off with "go read the tutorial, we have no time for you" or words to that effect. RAymond ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] I am now lost - committed, pulled, merged, what is "collapse"?

2011-03-21 Thread Raymond Hettinger
On Mar 21, 2011, at 8:25 AM, Barry Warsaw wrote: > > Does Mercurial have a way of acting like a centralized vcs to the end user, > the way Bazaar does? IOW, if Skip or others were more comfortable with a > centralized workflow (which is entirely valid imo), can they set up their > local workspac

Re: [Python-Dev] Hg: inter-branch workflow

2011-03-21 Thread Raymond Hettinger
rkflow described in the PEP. If the current workflow had been described there, I don't think it would have been readily accepted. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscrib

Re: [Python-Dev] [Python-checkins] cpython: Add optional *func* argument to itertools.accumulate().

2011-03-28 Thread Raymond Hettinger
On Mar 28, 2011, at 12:38 AM, Daniel Stutzbach wrote: > On Sun, Mar 27, 2011 at 10:53 PM, Nick Coghlan wrote: > On Mon, Mar 28, 2011 at 2:11 PM, Daniel Stutzbach > wrote: > > Is there a good use-case for the func argument? > > The examples that Raymond gives in

Re: [Python-Dev] Please revert autofolding of tracker edit form

2011-03-30 Thread Raymond Hettinger
ld be a button to fold as well as one to unfold. +1 Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger
/qyKv/ http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/ Raymond P.S. The old svn viewer worked great (looked good and could be cut), but that was changed just before the Mercurial switchover (the fonts changed, the line numbering code changed, an

Re: [Python-Dev] Please revert autofolding of tracker edit form

2011-03-31 Thread Raymond Hettinger
On Mar 31, 2011, at 9:52 AM, Terry Reedy wrote: > I would like to try putting the comment box after the last (most recent) > comment, as that is the message one most ofter responds to. Having to now > scroll up and down between comment box and last message(s) is often of a > nuisance. While t

Re: [Python-Dev] Please revert autofolding of tracker edit form

2011-03-31 Thread Raymond Hettinger
tes, whatever you want to call it, but when it comes to following a > discussion it's much easier to start with the first word. Perhaps the most important part is that the comment box goes at the top. Raymond ___ Python-Dev mailin

Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger
On Mar 31, 2011, at 5:30 PM, Antoine Pitrou wrote: > On Thu, 31 Mar 2011 16:15:48 -0700 > Raymond Hettinger wrote: >> The Hg source viewer needs to be tweaked to improve its usability. >> What we've got now is a step backwards from the previous svn viewer. >> >&

Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger
On Mar 31, 2011, at 5:55 PM, Antoine Pitrou wrote: > Le jeudi 31 mars 2011 à 17:46 -0700, Raymond Hettinger a écrit : >> On Mar 31, 2011, at 5:30 PM, Antoine Pitrou wrote: >> >>> On Thu, 31 Mar 2011 16:15:48 -0700 >>> Raymond Hettinger wrote: >>>>

Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger
On Mar 31, 2011, at 6:28 PM, Victor Stinner wrote: > Le 01/04/2011 01:15, Raymond Hettinger a écrit : >> The Hg source viewer needs to be tweaked to improve its usability. >> What we've got now is a step backwards from the previous svn viewer. >> >> Looking at h

Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Raymond Hettinger
install this, or something else, or change the > templates? If so, please let me know so I can give you access to > dinsdale. Yes please. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-05 Thread Raymond Hettinger
h min, sort, etc. A good PEP should address these issues head-on. Just saying that C and python code have to be semantically identical in all implementation details doesn't really address the issue. [Brett] > (sorry, Raymond, for picking on heapq, but is > was what bit the PyPy pe

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-06 Thread Raymond Hettinger
ake it impossible for client code to use subclasses of builtin types (issue 10977). That is another area where differences will arise that will matter to some users. Raymond P.S. It would be great if the PEP were to supply a complete, real-word example of code that is considered to be identical. A

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-06 Thread Raymond Hettinger
PEP just boil down to "if a test is C specific, it should be marked as such"? Anyone setting out to create equivalent code is already trying to making it as functionally equivalent as possible. At some point, we should help implementers by thinking out what kinds of implementation d

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-06 Thread Raymond Hettinger
On Apr 6, 2011, at 1:22 PM, Brett Cannon wrote: > > > On Wed, Apr 6, 2011 at 12:45, Raymond Hettinger > wrote: > > On Apr 6, 2011, at 10:39 AM, Brett Cannon wrote: > > Since people are taking my "semantically identical" point too strongly for > &g

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-06 Thread Raymond Hettinger
e next() method is called while the C equivalent makes the check immediately upon instantiation (i.e. map(chr, 3) raises TypeError immediately in C but a pure python generator won't raise until the generator is actually run). Raymond ___ Pyt

Re: [Python-Dev] Force build form

2011-04-06 Thread Raymond Hettinger
On Apr 6, 2011, at 2:40 PM, Antoine Pitrou wrote: > For the record, I've tried to make the force build form clearer on the > buildbot Web UI. See e.g.: > http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%20custom Much improved. Tha

Re: [Python-Dev] Code highlighting in tracker

2011-04-07 Thread Raymond Hettinger
thing to learn and maintain * many ways to do it (code paste, rietveld, attaching a patch, plain text, etc) * smells of feature creep Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] peps: Update PEP 399 to include comments from python-dev.

2011-04-13 Thread Raymond Hettinger
e PEP should address whether we want any new C modules at all. That would be better than setting a formal requirement that doesn't address any of the realities of building two versions of a module and keeping them in sync. Raymond ___ Python-Dev m

Re: [Python-Dev] python and super

2011-04-14 Thread Raymond Hettinger
ation detail of a class to its > subclasses, and make "fragile base class" problems worse. (i.e., where an > internal change to a base class breaks a previously-working subclass). I agree. Better for someone to submit a recipe for a variant of super and see if there is any uptake.

Re: [Python-Dev] Status of json (simplejson) in cpython

2011-04-14 Thread Raymond Hettinger
me the core parsing logic won't be changing much. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] python and super

2011-04-14 Thread Raymond Hettinger
ss that makes an explicit __init__ call to the external class and then calls super().__init__() to continue the forwarding. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-16 Thread Raymond Hettinger
e > collectively choose to), but I'm assuming we won't. > > http://mail.python.org/pipermail/python-dev/2011-April/110675.html > > Raymond thinks that have a testing requirement conflates having > implementations match vs. APIs. That is not an accurate restate

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-17 Thread Raymond Hettinger
ight be acceptable to Antoine. Actually, I would also be fine with > saying "comprehensive" instead, with a note that 100% branch coverage is > a good way to head toward that goal, since a comprehensive test suite > should contain more tests than the minimum set needed to get to 100%

Re: [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-18 Thread Raymond Hettinger
On Apr 18, 2011, at 10:11 AM, Maciej Fijalkowski wrote: > > * we usually target CPython version that's already frozen, which is > pretty inconvinient to post this changes back. Example would be a > socket module where it has changed enough in 3.x that 2.7 changes make > no sense. Do you have an

Re: [Python-Dev] Why doesn't `functools.total_ordering` use the existing ordering methods?

2011-04-25 Thread Raymond Hettinger
elf > other)], '__ge__': [('__le__', lambda self, other: (not self >= other) or self == other), ('__gt__', lambda self, other: self >= other and not self == other), ('__lt__', lambda self, other: not

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Raymond Hettinger
tegory as creating a __hash__ that has no relationship to __eq__ or making self-referencing sets or setting False,True=1,0 in python 2. See http://bertrandmeyer.com/2010/02/06/reflexivity-and-other-pillars-of-civilization/ for a nice blog post on the subject. Raymond _

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Raymond Hettinger
27;s possible for a sequence to define a __len__ that is different from it true length; it just won't behave well with the various pieces of code that assume collections are equal if the lengths are unequal. All of this seems reasonable to me. Raymond __

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Raymond Hettinger
On Apr 27, 2011, at 10:16 AM, Alexander Belopolsky wrote: > Unfortunately NaNs are not that exotic. They're exotic in the sense that they have the unusual property of not being equal to themselves. Exotic (adj) strikingly strange or unusual

[Python-Dev] Identity implies equality

2011-04-28 Thread Raymond Hettinger
have no problem using NaNs as-is. AFAICT, the only actual problem in front us is the OP's post where he was able to surprise himself with some NaN experiments at the interactive prompt. Raymond ___ Python-Dev mailing list Python-Dev@python.o

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Raymond Hettinger
ts as compared to learning tons > of new methods. YMMV. I've also observed that people appreciate using asserts with nose.py and py.test. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Raymond Hettinger
On Apr 28, 2011, at 3:07 PM, Guido van Rossum wrote: > On Thu, Apr 28, 2011 at 2:53 PM, Raymond Hettinger > wrote: >> >> On Apr 28, 2011, at 1:27 PM, Holger Krekel wrote: >> >>> On Thu, Apr 28, 2011 at 6:59 PM, Guido van Rossum wrote: >>>>

Re: [Python-Dev] Python 3.2.1

2011-05-01 Thread Raymond Hettinger
to http://www.python.org/dev/daily-dmg/ , I've been able to work off of the head every day. Python 3.2.1 is in pretty good shape :-) Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/

Re: [Python-Dev] Borrowed and Stolen References in API

2011-05-05 Thread Raymond Hettinger
;> # reference to the item argument! >> >> Should we change this file then? >> And only list functions that don't follow the usual conventions. >> >> But I'm sure that there are external tools which already use refcounts.dat >> in its present f

Re: [Python-Dev] [Python-checkins] cpython (3.2): Avoid codec spelling issues by just using the utf-8 default.

2011-05-05 Thread Raymond Hettinger
On May 5, 2011, at 11:41 AM, Benjamin Peterson wrote: > 2011/5/5 raymond.hettinger : >> http://hg.python.org/cpython/rev/1a56775c6e54 >> changeset: 69857:1a56775c6e54 >> branch: 3.2 >> parent: 69855:97a4855202b8 >> user:Raymond Hettinger &g

Re: [Python-Dev] Python 3.x and bytes

2011-05-17 Thread Raymond Hettinger
'm parsing a .dbf file and extracting field types from the byte stream, > I'm not thinking, "okay, 67 is a Character field" -- what I'm thinking is, > "b'C' is a Character field". > > Considering that ord() still works fine, I'm not

Re: [Python-Dev] Python 3.x and bytes

2011-05-19 Thread Raymond Hettinger
the same hash value". Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-checkins] cpython: Fix reST label for collections ABCs.

2011-06-03 Thread Raymond Hettinger
On Jun 3, 2011, at 10:27 AM, eric.araujo wrote: > > Fix reST label for collections ABCs. > > The previous markup hijacked the abstract-base-classes glossary entry, > which resulted in the HTML linking to collections.abc when defining the > generic ABC concept. Now the glossary links to the abc

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Raymond Hettinger
eworks, and high level APIs, but I agree with Martin that the Socket HOWTO needs to cover sockets. That's what a person expects to learn when they click on the Socket HOWTO link. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://

Re: [Python-Dev] Lazy unpacking for struct module

2011-06-12 Thread Raymond Hettinger
t-forward, least magical implementations of object (why we use array based lists instead of blist for example). The are exceptions such as Python 3's version of super() but this isn't the norm. I do suggest that you publish your code as a third-party module to make the optional available and to validate whether there is any real interest in this. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Lazy unpacking for struct module

2011-06-12 Thread Raymond Hettinger
On Jun 12, 2011, at 3:18 PM, Greg Ewing wrote: > Raymond Hettinger wrote: > >> The problem you're trying to solve isn't unique to structs. >> That's why we get periodic requests for ropes-like behaviors > > I don't think he's asking for rope

Re: [Python-Dev] [Python-checkins] cpython (2.7): Fixup repr for dict_proxy objects.

2011-06-29 Thread Raymond Hettinger
On Jun 30, 2011, at 2:14 AM, Ezio Melotti wrote: > Hi, > > On Thu, Jun 30, 2011 at 2:51 AM, raymond.hettinger > wrote: > Fixup repr for dict_proxy objects. > > > This was already fixed in a slightly different way in 3.x. The %R formatting code is not available in 2.x Raymond_

Re: [Python-Dev] New tests in stable versions

2011-07-21 Thread Raymond Hettinger
do nothing more than improve > test coverage, not exercise a fix for a bug. > > I say don't add new tests for the sake of coverage or adding new tests to > stable branches. Tests for bugfixes are practically required. I concur with Brett. Nothing good w

Re: [Python-Dev] [Python-checkins] devguide: Add a communications section to the devguide FAQ (closes #11690)

2011-07-21 Thread Raymond Hettinger
Please don't add the IRC link to the devguide. Based on conversations with Guido, he is against it being part of the core development process. Raymond On Jul 21, 2011, at 4:08 AM, Nick Coghlan wrote: > On Thu, Jul 21, 2011 at 7:16 PM, Ezio Melotti wrote: >> >> FWIW yo

Re: [Python-Dev] tuple[int] optimization

2011-07-23 Thread Raymond Hettinger
seless. Collectively however, we've gotten nice speed-ups on real programs. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/arc

Re: [Python-Dev] The docs, reloaded

2007-05-22 Thread Raymond Hettinger
LaTeX mistakes and giving high-quality error reporting. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] The docs, reloaded

2007-05-22 Thread Raymond Hettinger
(more than a line or two). For a long-time, we've always said that it is okay to submit plain text doc contributions and that another person downstream would do the mark-up. We've had few takers. Raymond ___ Python-Dev mailing list Python-D

Re: [Python-Dev] The docs, reloaded

2007-05-22 Thread Raymond Hettinger
(more than a line or two). For a long-time, we've always said that it is okay to submit plain text doc contributions and that another person downstream would do the mark-up. We've had few takers. Raymond ___ Python-Dev mailing list Python-D

Re: [Python-Dev] The docs, reloaded

2007-05-22 Thread Raymond Hettinger
(more than a line or two). For a long-time, we've always said that it is okay to submit plain text doc contributions and that another person downstream would do the mark-up. We've had few takers. Raymond ___ Python-Dev mailing list Python-D

<    2   3   4   5   6   7   8   9   10   11   >