Re: [Python-Dev] Documentation idea

2008-10-16 Thread Scott Dial
Raymond Hettinger wrote: * It will assist pypy style projects and other python implementations when they have to build equivalents to CPython. * Will eliminate confusion about what functions were exactly intended to do. * Will confer benefits similar to test driven development where the

Re: [Python-Dev] Documentation idea

2008-10-16 Thread Brett Cannon
On Thu, Oct 16, 2008 at 11:13 AM, Scott Dial [EMAIL PROTECTED] wrote: Raymond Hettinger wrote: * It will assist pypy style projects and other python implementations when they have to build equivalents to CPython. * Will eliminate confusion about what functions were exactly intended to do.

Re: [Python-Dev] Documentation idea

2008-10-16 Thread Raymond Hettinger
Raymond Hettinger wrote: * It will assist pypy style projects and other python implementations when they have to build equivalents to CPython. * Will eliminate confusion about what functions were exactly intended to do. * Will confer benefits similar to test driven development where the

Re: [Python-Dev] Documentation idea

2008-10-16 Thread Doug Hellmann
On Oct 16, 2008, at 5:11 PM, Raymond Hettinger wrote: Raymond Hettinger wrote: * It will assist pypy style projects and other python implementations when they have to build equivalents to CPython. * Will eliminate confusion about what functions were exactly intended to do. * Will

Re: [Python-Dev] Documentation idea

2008-10-16 Thread Raymond Hettinger
From: Doug Hellmann [EMAIL PROTECTED] This seems like a large undertaking. Not necessarily. It can be done incrementally, starting with things like str.split() that almost no one understands completely. It should be put here and there where it adds some clarity. I'm sure you're not

Re: [Python-Dev] Documentation idea

2008-10-15 Thread Fernando Perez
Raymond Hettinger wrote: Bright idea -- Let's go one step further and do this just about everywhere and instead of putting it in the docs, attach an exec-able string as an attribute to our C functions. Further, those pure python examples should include doctests so that the user

Re: [Python-Dev] Documentation idea

2008-10-11 Thread Brett Cannon
On Fri, Oct 10, 2008 at 9:46 PM, Terry Reedy [EMAIL PROTECTED] wrote: Brett Cannon wrote: On Fri, Oct 10, 2008 at 1:45 PM, Terry Reedy [EMAIL PROTECTED] wrote: The advantage of the decorator version is that the compiler or module loader could be special cased to recognize the 'C' decorator

Re: [Python-Dev] Documentation idea

2008-10-10 Thread Brett Cannon
On Thu, Oct 9, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote: On 9 Oct, 11:12 pm, [EMAIL PROTECTED] wrote: Background -- In the itertools module docs, I included pure python equivalents for each of the C functions. Necessarily, some of those equivalents are only approximate but they

Re: [Python-Dev] Documentation idea

2008-10-10 Thread Terry Reedy
[EMAIL PROTECTED] wrote: On 9 Oct, 11:12 pm, [EMAIL PROTECTED] wrote: Background -- In the itertools module docs, I included pure python equivalents for each of the C functions. Necessarily, some of those equivalents are only approximate but they seem to have greatly enhanced the

Re: [Python-Dev] Documentation idea

2008-10-10 Thread Brett Cannon
On Fri, Oct 10, 2008 at 1:45 PM, Terry Reedy [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On 9 Oct, 11:12 pm, [EMAIL PROTECTED] wrote: Background -- In the itertools module docs, I included pure python equivalents for each of the C functions. Necessarily, some of those

Re: [Python-Dev] Documentation idea

2008-10-10 Thread Terry Reedy
Brett Cannon wrote: On Fri, Oct 10, 2008 at 1:45 PM, Terry Reedy [EMAIL PROTECTED] wrote: The advantage of the decorator version is that the compiler or module loader could be special cased to recognize the 'C' decorator and try it first *before* using the Python version, which would serve as

[Python-Dev] Documentation idea

2008-10-09 Thread Raymond Hettinger
Background -- In the itertools module docs, I included pure python equivalents for each of the C functions. Necessarily, some of those equivalents are only approximate but they seem to have greatly enhanced the docs. Something similar is in the builtin docs for any() and all(). The

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Christian Heimes
Raymond Hettinger wrote: lots of cool stuff! The idea sounds great! Are you planing to embed the pure python code in C code? That's going to increase the data segment of the executable. It should be possible to disable and remove the pure python example with a simple ./configure option and

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Raymond Hettinger
[Christian Heimes] The idea sounds great! Are you planing to embed the pure python code in C code? Am experimenting with a descriptor that fetches the attribute string from a separate text file. This keeps the C build from getting fat. More importantly, it let's us write the execable

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Brett Cannon
On Thu, Oct 9, 2008 at 4:12 PM, Raymond Hettinger [EMAIL PROTECTED] wrote: [SNIP] Bright idea -- Let's go one step further and do this just about everywhere and instead of putting it in the docs, attach an exec-able string as an attribute to our C functions. Further, those pure

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Lisandro Dalcin
On Thu, Oct 9, 2008 at 8:50 PM, Raymond Hettinger [EMAIL PROTECTED] wrote: [Christian Heimes] The idea sounds great! Are you planing to embed the pure python code in C code? Am experimenting with a descriptor that fetches the attribute string from a separate text file. Have you ever

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Raymond Hettinger
Yes, I'm looking a couple of different approaches to loading the strings. For now though, I want to focus on the idea itself, not the implementation. The important thing is to gather widespread support before getting into the details of how the strings get loaded. Raymond - Original

Re: [Python-Dev] Documentation idea

2008-10-09 Thread glyph
On 9 Oct, 11:12 pm, [EMAIL PROTECTED] wrote: Background -- In the itertools module docs, I included pure python equivalents for each of the C functions. Necessarily, some of those equivalents are only approximate but they seem to have greatly enhanced the docs. Why not go the other

Re: [Python-Dev] Documentation idea

2008-10-09 Thread Jared Grubb
This is a really interesting idea. If extra memory/lookup overhead is a concern, you could enable this new feature by default when the interactive interpreter is started (where it's more likely to be invoked), and turn it off by default when running scripts/modules. Jared On 9 Oct 2008,