Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Hynek Schlawack
Am 04.12.2012 um 00:42 schrieb Gregory P. Smith : > * How would we convert all the builtins to use Clinic? I fear any > solution will involve some work by hand. Even if we can automate > big chunks of it, fully automating it would require parsing arbitrary > C. This seems like overkill fo

Re: [Python-Dev] cpython: Issue #16455: On FreeBSD and Solaris, if the locale is C, the

2012-12-04 Thread Victor Stinner
Hi, 2012/12/4 Christian Heimes : > Am 04.12.2012 03:23, schrieb victor.stinner: >> http://hg.python.org/cpython/rev/c25635b137cc >> changeset: 80718:c25635b137cc >> parent: 80716:b845901cf702 >> user:Victor Stinner >> date:Tue Dec 04 01:34:47 2012 +0100 >> summary: >> Iss

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Antoine Pitrou
Le Mon, 03 Dec 2012 14:29:35 -0800, Larry Hastings a écrit : > >/*[clinic] >dbm.open -> mapping >basename=dbmopen > >const char *filename; >The filename to open. So how does it handle the fact that filename can either be a unicode string or a fsencoding-encoded b

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Ulrich Eckhardt
Am 03.12.2012 23:29, schrieb Larry Hastings: [...autogen some code from special comment strings...] /*[clinic] dbm.open -> mapping basename=dbmopen const char *filename; The filename to open. const char *flags="r"; How to open the file. "r" for read

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Larry Hastings
On 12/04/2012 04:10 AM, Ulrich Eckhardt wrote: This also brings me to a single question I have for your proposal: Why did you create another DSL instead of using Python, i.e. instead of using cog directly? Looking at the above, I could imagine this being written like this instead: Actually my

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Stefan Behnel
Larry Hastings, 03.12.2012 23:29: > Say there, the Python core development community! Have I got > a question for you! > > *ahem* > > Which of the following four options do you dislike least? ;-) > > 1) CPython continues to provide no "function signature" >objects (PEP 362) or inspect.getf

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread David Malcolm
On Mon, 2012-12-03 at 14:29 -0800, Larry Hastings wrote: [...snip compelling sales pitch...] I like the idea. As noted elsewhere, sane generated C code is much easier to step through in the debugger than preprocessor macros (though "sane" in that sentence is begging the question, I guess, but th

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Larry Hastings
On 12/04/2012 01:08 AM, Antoine Pitrou wrote: Le Mon, 03 Dec 2012 14:29:35 -0800, Larry Hastings a écrit : /*[clinic] dbm.open -> mapping basename=dbmopen const char *filename; The filename to open. So how does it handle the fact that filename can either be a

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Brett Cannon
On Mon, Dec 3, 2012 at 5:29 PM, Larry Hastings wrote: > > Say there, the Python core development community! Have I got > a question for you! > > *ahem* > > Which of the following four options do you dislike least? ;-) > > 1) CPython continues to provide no "function signature" >objects (PEP

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Barry Warsaw
On Dec 04, 2012, at 11:47 AM, David Malcolm wrote: >As noted elsewhere, sane generated C code is much easier to step through >in the debugger than preprocessor macros (though "sane" in that sentence >is begging the question, I guess, but the examples you post look good to >me). And to me too. -B

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Antoine Pitrou
On Tue, 04 Dec 2012 11:04:09 -0800 Larry Hastings wrote: > > Along these lines, I've been contemplating proposing that Clinic > specifically understand "path" arguments, distinctly from other string > arguments, as they are both common and rarely handled correctly. My > main fear is that I pr

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Guido van Rossum
On Tue, Dec 4, 2012 at 11:35 AM, Antoine Pitrou wrote: > On Tue, 04 Dec 2012 11:04:09 -0800 > Larry Hastings wrote: >> >> Along these lines, I've been contemplating proposing that Clinic >> specifically understand "path" arguments, distinctly from other string >> arguments, as they are both commo

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Armin Rigo
Hi, On Mon, Dec 3, 2012 at 3:42 PM, Gregory P. Smith wrote: > In fact allowing a version of Clinic to work stand alone as a > PyPI project and generate Python 2.7 and 3.2/3.3 extension module > boilerplate could would increase its adoption and improve the quality of > some existing extension modu

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Brett Cannon
On Tue, Dec 4, 2012 at 4:17 PM, Guido van Rossum wrote: > On Tue, Dec 4, 2012 at 11:35 AM, Antoine Pitrou > wrote: > > On Tue, 04 Dec 2012 11:04:09 -0800 > > Larry Hastings wrote: > >> > >> Along these lines, I've been contemplating proposing that Clinic > >> specifically understand "path" argu

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Chris Angelico
On Tue, Dec 4, 2012 at 9:29 AM, Larry Hastings wrote: > To save you a little time, here's a preview of using Clinic for > dbm.open(). The stuff at the same indent as a declaration are > options; see the "clinic.txt" in the repo above for full documentation. > > /*[clinic] >... hand-written cont

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Antoine Pitrou
On Tue, 4 Dec 2012 16:45:54 -0500 Brett Cannon wrote: > > > > +1 for getting this into 3.4. Does it need a PEP, or just a bug > > tracker item + code review? I think the latter is fine -- it's > > probably better not to do too much bikeshedding but just to let Larry > > propose a patch, have it re

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Brett Cannon
On Tue, Dec 4, 2012 at 4:48 PM, Antoine Pitrou wrote: > On Tue, 4 Dec 2012 16:45:54 -0500 > Brett Cannon wrote: > > > > > > +1 for getting this into 3.4. Does it need a PEP, or just a bug > > > tracker item + code review? I think the latter is fine -- it's > > > probably better not to do too muc

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Antoine Pitrou
On Tue, 4 Dec 2012 16:54:27 -0500 Brett Cannon wrote: > On Tue, Dec 4, 2012 at 4:48 PM, Antoine Pitrou wrote: > > > On Tue, 4 Dec 2012 16:45:54 -0500 > > Brett Cannon wrote: > > > > > > > > +1 for getting this into 3.4. Does it need a PEP, or just a bug > > > > tracker item + code review? I thi

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Barry Warsaw
On Dec 04, 2012, at 10:48 PM, Antoine Pitrou wrote: >I think the DSL itself does warrant public exposure. It will be an >element of the CPython coding style, if its use becomes widespread. We do have PEP 7 after all. No matter what, this stuff has to eventually be well documented outside of the

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Brian Curtin
On Tue, Dec 4, 2012 at 3:54 PM, Brett Cannon wrote: > But going through python-ideas for this I think is a bit much. It would never end. I think an issue on roundup could work just fine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyt

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Larry Hastings
On 12/04/2012 01:49 PM, Chris Angelico wrote: One thing I'm not entirely clear on. Do you run Clinic on a source file and it edits that file, or is it a step in the build process? Your description of a preprocessor makes me think the latter, but the style of code (eg the checksum) suggests the fo

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Larry Hastings
On 12/04/2012 02:10 PM, Brian Curtin wrote: I think an issue on roundup could work just fine. http://bugs.python.org/issue16612 Cheers, //arry/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Uns

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Chris Angelico
On Wed, Dec 5, 2012 at 9:17 AM, Larry Hastings wrote: > Here's my blue-sky probably-overengineered proposal: we (and when I say "we" > I mean "I") write a cross-platform C program that could be harmlessly but > usefully integrated into the build process. First, we add a checksum for > the *input*

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Nick Coghlan
On Wed, Dec 5, 2012 at 8:17 AM, Larry Hastings wrote: > I get the sneaking suspicion that I'm going to rewrite Clinic to run under > either Python 2.7 or 3, > For bootstrapping purposes, isn't it enough to just ignore the checksums if there's no Python interpreter already built? We can have a co

Re: [Python-Dev] Keyword meanings [was: Accept just PEP-0426]

2012-12-04 Thread PJ Eby
On Mon, Dec 3, 2012 at 2:43 PM, Daniel Holth wrote: > How to use Obsoletes: > > The author of B decides A is obsolete. > > A releases an empty version of itself that Requires: B > > B Obsoletes: A > > The package manager says "These packages are obsolete: A". Would you like to > remove them? > > U

Re: [Python-Dev] Keyword meanings [was: Accept just PEP-0426]

2012-12-04 Thread Donald Stufft
On Wednesday, December 5, 2012 at 2:13 AM, PJ Eby wrote: > On Mon, Dec 3, 2012 at 2:43 PM, Daniel Holth (mailto:dho...@gmail.com)> wrote: > > How to use Obsoletes: > > > > The author of B decides A is obsolete. > > > > A releases an empty version of itself that Requires: B > > > > B Obsoletes: