Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-22 Thread Georg Brandl
Brett Cannon schrieb: > 4. The var directive is not working even though the docs list it as a > valid directive; so is it still valid and something is broken, or the > docs need to be updated? (First, you're confusing "directive" and "role" which led to some confusion on

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-22 Thread Brett Cannon
On Thu, Jan 22, 2009 at 10:12, Georg Brandl wrote: > Brett Cannon schrieb: > 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, c=None]])``) really necessary when default argument values are present? And do we really need to nest the brackets when it is obvious >>

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-22 Thread Georg Brandl
Brett Cannon schrieb: >>> 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, >>> c=None]])``) really necessary when default argument values are >>> present? And do we really need to nest the brackets when it is obvious >>> that having on optional argument means the rest are opti

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-21 Thread Brett Cannon
On Wed, Jan 21, 2009 at 13:53, Georg Brandl wrote: > Brett Cannon schrieb: >> I have been writing up the initial docs for importlib and four things struck >> me: >> >> 1. Why is three space indents the preferred indentation level? > > As said, it matches directive content with directive headers n

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-21 Thread Georg Brandl
Brett Cannon schrieb: > I have been writing up the initial docs for importlib and four things struck > me: > > 1. Why is three space indents the preferred indentation level? As said, it matches directive content with directive headers nicely. Ben's solution is nice as well, but now that we have

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2009 at 8:39 AM, Paul Moore wrote: > 2009/1/20 Benjamin Peterson : >> We might be opening a can of worms, though. Do we document everything >> that takes a dictionary argument with collections.Mapping or >> everything that takes a integer numbers.Rationale? What if multiple >> type

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Paul Moore
2009/1/20 Benjamin Peterson : > We might be opening a can of worms, though. Do we document everything > that takes a dictionary argument with collections.Mapping or > everything that takes a integer numbers.Rationale? What if multiple > types are possible? No. Only document things as taking an ABC

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Benjamin Peterson
On Mon, Jan 19, 2009 at 11:56 PM, Brett Cannon wrote: > On Mon, Jan 19, 2009 at 19:19, Benjamin Peterson wrote: >> On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon wrote: >>> On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson >>> wrote: On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: >>>

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Michael Foord
Brett Cannon wrote: On Mon, Jan 19, 2009 at 19:02, Scott Dial wrote: Brett Cannon wrote: 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, c=None]])``) really necessary when default argument values are present? And do we really need to nest the brackets when it is o

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Raymond Hettinger
In particular, look at the urls for: http://docs.python.org/dev/library/collections.html#id1 versus http://docs.python.org/dev/library/collections.html#abcs-abstract-base-classes I would like all of the targets to have meaningful names. [Brett] Not sure from a sphinx perspective, but Docutil

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Brett Cannon
On Mon, Jan 19, 2009 at 19:02, Scott Dial wrote: > Brett Cannon wrote: >> 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, >> c=None]])``) really necessary when default argument values are >> present? And do we really need to nest the brackets when it is obvious >> that having

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Brett Cannon
On Mon, Jan 19, 2009 at 19:50, Raymond Hettinger wrote: > I have another question about doc formatting. > > What controls whether section headers get urls with a custom named jump > target instead of a default name like "id1"? > > In particular, look at the urls for: > http://docs.python.org/dev

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Brett Cannon
On Mon, Jan 19, 2009 at 19:19, Benjamin Peterson wrote: > On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon wrote: >> On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson wrote: >>> On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: 2. Should we start using function annotations? >>> >>> No,

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Ben Finney
"Raymond Hettinger" writes: > What controls whether section headers get urls with a custom named > jump target instead of a default name like "id1"? > > In particular, look at the urls for: >http://docs.python.org/dev/library/collections.html#id1 versus Hmm. Immediately preceding the eleme

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Raymond Hettinger
I have another question about doc formatting. What controls whether section headers get urls with a custom named jump target instead of a default name like "id1"? In particular, look at the urls for: http://docs.python.org/dev/library/collections.html#id1 versus http://docs.python.org/de

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Ben Finney
"Benjamin Peterson" writes: > On Mon, Jan 19, 2009 at 9:23 PM, Raymond Hettinger wrote: > > From: "Brett Cannon" > >> > >> 1. Why is three space indents the preferred indentation level? > > > > I've also wondered about this. It is somewhat incovenient > > when bringing in code samples from fil

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Benjamin Peterson
On Mon, Jan 19, 2009 at 9:23 PM, Raymond Hettinger wrote: > From: "Brett Cannon" >> >> 1. Why is three space indents the preferred indentation level? > > I've also wondered about this. It is somewhat incovenient > when bringing in code samples from files with four space indents. It's just reST

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Raymond Hettinger
From: "Brett Cannon" 1. Why is three space indents the preferred indentation level? I've also wondered about this. It is somewhat incovenient when bringing in code samples from files with four space indents. Raymond ___ Python-Dev mailing list Py

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Benjamin Peterson
On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon wrote: > On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson wrote: >> On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: >>> >>> 2. Should we start using function annotations? >> >> No, I think that information is better stored in the function descri

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Brett Cannon
On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson wrote: > On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: >> I have been writing up the initial docs for importlib and four things struck >> me: >> >> 1. Why is three space indents the preferred indentation level? > > Because it matches nicely

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Scott Dial
Brett Cannon wrote: > 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, > c=None]])``) really necessary when default argument values are > present? And do we really need to nest the brackets when it is obvious > that having on optional argument means the rest are optional as wel

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Benjamin Peterson
On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: > I have been writing up the initial docs for importlib and four things struck > me: > > 1. Why is three space indents the preferred indentation level? Because it matches nicely up with the length of directives: .. somedirective:: blah ^^^ >

[Python-Dev] Questions/comments on documentation formatting

2009-01-19 Thread Brett Cannon
I have been writing up the initial docs for importlib and four things struck me: 1. Why is three space indents the preferred indentation level? 2. Should we start using function annotations? 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, c=None]])``) really necessary when