Re: [Python-Dev] [Python-checkins] r88387 - python/branches/py3k/Lib/asyncore.py

2011-02-10 Thread Nick Coghlan
On Fri, Feb 11, 2011 at 4:42 AM, giampaolo.rodola wrote: > Author: giampaolo.rodola > Date: Thu Feb 10 19:42:36 2011 > New Revision: 88387 > > Log: > get rid of asyncore.dispatcher's debug attribute, which is no longer used > (assuming it ever was). Reviewer? NEWS entry? RM approval? Tracker iss

Re: [Python-Dev] API bloat

2011-02-10 Thread Nick Coghlan
On Fri, Feb 11, 2011 at 3:25 AM, Mark Shannon wrote: > Antoine Pitrou wrote: >>> >>> Please, don't just document all these. >>> Don't add them to the API, unless they are really needed. >> >> We only add functions when they are actually needed (by us, usually). > > If only you (I presume you mean

Re: [Python-Dev] API bloat

2011-02-10 Thread Victor Stinner
Le jeudi 10 février 2011 à 17:25 +, Mark Shannon a écrit : > What about this one then, > > PyFrame_GetLineNumber was added because people were using > PyCode_Addr2Line to get the current line number. > > The API will contain then both > PyFrame_GetLineNumber *and* PyCode_Addr2Line. > The API

Re: [Python-Dev] Proposal / Questions about OrderedDict literals and/or faster C implementation

2011-02-10 Thread Éric Araujo
Hello, Thanks for wanting to contribute and welcome to python-dev :) Ideas are usually discussed first on python-ideas to assess usefulness, get the pulse of the community, beat the API into shape and such things before coming up to python-dev. (A number of core devs are on both lists.) You may

[Python-Dev] Proposal / Questions about OrderedDict literals and/or faster C implementation

2011-02-10 Thread Steve Goss
I have a proposal for a literal syntax for OrderedDicts which is just replacing the braces with square brackets: ['a': 1,'b': 2] == OrderedDict([('a', 1),('b', 2)]) OrderedDict literals would follow: [x : x for x in foo()] == OrderedDict([(x,x) for x in foo()]) The rationale for the syntax is t

Re: [Python-Dev] [Python-checkins] devguide: Move to using mq for basic usage.

2011-02-10 Thread Sandro Tosi
Hi, On Wed, Feb 9, 2011 at 23:19, brett.cannon wrote: > +project's preference.  We present here a very simple solution based on mq_ > +(Mercurial Queue) non-core developers. for non-core devs (ok, this is not the last patch applied to the file, but it's still there after the next changes). > +T

Re: [Python-Dev] devguide: Fix a silly statement.

2011-02-10 Thread Georg Brandl
Am 10.02.2011 19:27, schrieb Brett Cannon: > On Wed, Feb 9, 2011 at 23:10, Georg Brandl wrote: >> Am 09.02.2011 23:58, schrieb brett.cannon: >>> brett.cannon pushed 7101df1bd817 to devguide: >>> >>> http://hg.python.org/devguide/rev/7101df1bd817 >>> changeset: 291:7101df1bd817 >>> branch: h

Re: [Python-Dev] devguide: Fix a silly statement.

2011-02-10 Thread Brett Cannon
On Wed, Feb 9, 2011 at 23:10, Georg Brandl wrote: > Am 09.02.2011 23:58, schrieb brett.cannon: >> brett.cannon pushed 7101df1bd817 to devguide: >> >> http://hg.python.org/devguide/rev/7101df1bd817 >> changeset:   291:7101df1bd817 >> branch:      hg_transition >> tag:         tip >> user:        Br

Re: [Python-Dev] API bloat

2011-02-10 Thread Georg Brandl
Am 10.02.2011 15:26, schrieb Mark Shannon: > M.-A. Lemburg wrote: >> Mark Shannon wrote: >>> Nick Coghlan wrote: On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon wrote: > Doing a search for the regex: "PyAPI_FUNC\([^)]*\) *Py" in .h files, > which should match API functions (functi

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
Antoine Pitrou wrote: Please, don't just document all these. Don't add them to the API, unless they are really needed. We only add functions when they are actually needed (by us, usually). If only you (I presume you mean the CPython devs) need them, why put them in the API. That underscore pre

Re: [Python-Dev] API bloat

2011-02-10 Thread Antoine Pitrou
> > Please, don't just document all these. > Don't add them to the API, unless they are really needed. We only add functions when they are actually needed (by us, usually). > I'm not picking on PySys_FormatStderr, or its author here, > I'm just using it as an example, it seems fairly typical.

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
Victor Stinner wrote: Le jeudi 10 février 2011 à 16:19 +0100, M.-A. Lemburg a écrit : And the following were added to 3.2, of which only 2 are documented: PyArg_ValidateKeywordArguments PyAST_CompileEx Py_CompileString Py_CompileStringExFlags PyErr_NewExceptionWithDoc(documented) PyErr_Synt

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
And the following were added to 3.2, of which only 2 are documented: PyArg_ValidateKeywordArguments PyAST_CompileEx Py_CompileString Py_CompileStringExFlags PyErr_NewExceptionWithDoc(documented) PyErr_SyntaxLocationEx PyErr_WarnFormat PyFrame_GetLineNumber PyImport_ExecCodeModuleWithPathnam

Re: [Python-Dev] API bloat

2011-02-10 Thread Victor Stinner
Le jeudi 10 février 2011 à 16:19 +0100, M.-A. Lemburg a écrit : > > And the following were added to 3.2, > > of which only 2 are documented: > > > > PyArg_ValidateKeywordArguments > > PyAST_CompileEx > > Py_CompileString > > Py_CompileStringExFlags > > PyErr_NewExceptionWithDoc(documented) > >

Re: [Python-Dev] API bloat

2011-02-10 Thread M.-A. Lemburg
Mark Shannon wrote: > M.-A. Lemburg wrote: >> Mark Shannon wrote: >>> Nick Coghlan wrote: On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon wrote: > Doing a search for the regex: "PyAPI_FUNC\([^)]*\) *Py" in .h files, > which should match API functions (functions starting _Py are >>

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
M.-A. Lemburg wrote: Mark Shannon wrote: Nick Coghlan wrote: On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon wrote: Doing a search for the regex: "PyAPI_FUNC\([^)]*\) *Py" in .h files, which should match API functions (functions starting _Py are excluded) gives the following result: Version

Re: [Python-Dev] API bloat

2011-02-10 Thread Nick Coghlan
On Thu, Feb 10, 2011 at 11:51 PM, M.-A. Lemburg wrote: >> The "what's new for 3.2" API section: >> http://docs.python.org/dev/py3k/whatsnew/3.2.html#build-and-c-api-changes >> lists 6 new functions, yet 14 have been added between 3.1.3 and 3.2b2. > > Could you identify the ones that are not yet do

Re: [Python-Dev] API bloat

2011-02-10 Thread M.-A. Lemburg
Mark Shannon wrote: > Nick Coghlan wrote: >> On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon >> wrote: >>> Doing a search for the regex: "PyAPI_FUNC\([^)]*\) *Py" in .h files, >>> which should match API functions (functions starting _Py are >>> excluded) gives >>> the following result: >>> >>> Vers

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
Nick Coghlan wrote: On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon wrote: Doing a search for the regex: "PyAPI_FUNC\([^)]*\) *Py" in .h files, which should match API functions (functions starting _Py are excluded) gives the following result: Version matches 3.0 717 3.1.3 728 3.2b2

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

2011-02-10 Thread Nick Coghlan
On Thu, Feb 10, 2011 at 7:20 PM, raymond.hettinger wrote: > +The :func:`logging.basicConfig` set-up function gained a *style* argument to > +support three different types of string formatting.  It defaults to "%" for > +traditional %-formatting, can be set to "{" for the new :meth:`str.format` >

Re: [Python-Dev] API bloat

2011-02-10 Thread Stefan Behnel
Mark Shannon, 10.02.2011 11:16: Of course 743 functions is about 700 too many, Sorry, but that's so wrong, it's just being mean. What do you expect from a platform that has grown for more than 20 years? And which has been the only (real) Python implementation for most of that time. I'm sure

Re: [Python-Dev] API bloat

2011-02-10 Thread Nick Coghlan
On Thu, Feb 10, 2011 at 8:16 PM, Mark Shannon wrote: > Doing a search for the regex:  "PyAPI_FUNC\([^)]*\) *Py" in .h files, > which should match API functions (functions starting _Py are excluded) gives > the following result: > > Version  matches > 3.0       717 > 3.1.3     728 > 3.2b2     743 >

Re: [Python-Dev] API bloat

2011-02-10 Thread Mark Shannon
Thanks to everyone for all their comments so far. Martin v. Löwis wrote: The functions may have been add to CPython 8 years ago, but they were added to the API when they appeared in the docs, between 3.1 and 3.1.3. How is the API defined, if not by the documentation? Just to stress and suppor