Re: [Python-Dev] www.python.org/doc and docs.python.org hotfixed

2008-10-15 Thread engelbert gruber
On Thu, Oct 2, 2008 at 11:49 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote:

> Long term, remapping even the deep links to the appropriate part of the
> new docs should hopefully be possible.
>
> For the search engine issue, is there any way we can tell robots to
> ignore the rewrite rules so they see the broken links? (although even
> that may not be ideal, since what we really want is to tell the robot
> the link is broken, and provide the new alternative)

wouldnt that be a situation to use hTTP 301/permanently moved headers

all the best
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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 can see a typical invocation and calling
> pattern.
> 
> Say we decide to call the attribute something like ".python", then you
> could write something like:
> 
> >>> print(all.python)
>def all(iterable):
> '''Return True if all elements of the iterable are true.
> 

[...]

+1 from the peanut gallery, with a note: since ipython is a common way for
many to use/learn python interactively, if this is adopted, we'd
*immediately* add to ipython's '?' introspection machinery the ability to
automatically find this information.  This way, when people type "all?"
or "all??" we'd fetch the doc and source code.

A minor question inspired by this: would it make sense to split the
docstring part from the code of this .python object?  I say this because in
principle, the docstring should be the same of the 'parent', and it would
simplify our implementation to eliminate the duplicate printout. 
The .python object could always be a special string-like object made from
combining the pure python code with a single docstring, common to the C and
the Python versions, that would remain exec-able.

In any case, details aside I think this is great and if it comes to pass,
we'll be happy to make it readily accessible to interactive users via
ipython.

Cheers,

f

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com