This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make source code links less prominent
Type: Stage:
Components: Documentation Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: belopolsky, benjamin.peterson, docs@python, eric.araujo, pitrou, r.david.murray, rhettinger
Priority: normal Keywords:

Created on 2011-01-07 18:09 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (10)
msg125669 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-07 18:09
Reading library source code will only be enlightening to expert users, since most modules are not academic but real-world implementations, with all the complications it entails. Therefore, putting a link at the top of module sections is only confusing for most people. I would like to shift these links to the bottom of doc pages, where we already have "see also" links to RFCs and the like.
msg125692 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-01-07 19:40
+1
msg125699 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-01-07 19:51
Please leave these alone for the time being. I put them high on the page so that people would have a consistent and easy to find view-source link.  It is an experiment and time will tell whether it was a good choice.  For the time being, I don't want it buried.  

The goal is to reacquaint people with the source as an adjunct to the docs.  The phrase use-the-source-luke used to be common in the python community but now many devs don't seem to be able to readily access the source (with it tucked away in a library directory).
msg125700 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-07 19:56
> The goal is to reacquaint people with the source as an adjunct to the
> docs.  The phrase use-the-source-luke used to be common in the python
> community but now many devs don't seem to be able to readily access
> the source (with it tucked away in a library directory).

I don't think someone "not able to readily access the source" from a
link at the *bottom* of a doc page would be able to understand (or even
be motivated to understand) the stdlib's source code.

While I understand the motivation to encourage reading of the source
code, this should not disrupt the sequential reading of documentation
pages, or make it seem more important than the API docs themselves.
msg125711 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-01-07 21:17
As Raymond explained, he added these links as a kind of social experiment and this issue itself shows that it works. :-)

I have a few suggestions on how to make these links more useful:

1. A ViewVC link is the simplest solution to present the source, but the way it presents the source code looks foreign to sphinx docs.  It would be better if the source was formatted similarly to the source examples embedded in doc pages.

2. It would be great to have at least module names hyperlinked in the source views to aid code navigation.

3. I would rather see source links appear consistently for each module and not just for an ad-hoc selection.

4. The side bar already has a "Show Source" link which takes to the reST source of the page.  I don't think this is very useful.  Maybe this link should point to the Python source or a separate "python source" link should appear next to it.
msg125712 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-07 21:30
> I have a few suggestions on how to make these links more useful:

The question is not how they could be more useful, but *whether* they
are useful at all. An user skilled enough to read the source code is
probably skilled enough not to require a prominently displayed link at
the top of each doc page.

I agree that visual appearance of the ViewVC pages could be better but
that's a separate issue altogether.
msg125713 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-01-07 21:32
1: I hope this will just be a matter of using the same Pygments theme in Sphinx and hgweb.

2: I don’t think hgweb can do that.  Mercurial being extensible, this addition may be a fun project.

3: Not all modules are good examples (see threading for some unelegant code), so I support ad-hoc selection.  I also support the real fix of improving the quality of every module, but that’s longer-term. :)

4: “Show Source” is a link that is easily overlooked IMO, a seealso section makes me think people will actually see the link.  There is also the minor concern of breaking expectations of people accustomed to Sphinx.
msg125717 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-01-07 21:52
On Fri, Jan 7, 2011 at 4:32 PM, Éric Araujo <report@bugs.python.org> wrote:
..
> 3: Not all modules are good examples (see threading for some unelegant code), so I support ad-hoc selection.

The problem with ad-hoc selection is that it adds maintenance burden
(someone has to make a call) and it is inherently subjective.  For
example, I find dis.py source code rather uninspiring while
pickletools.py has a trove of valuable information about pickle
opcodes that is not available elsewhere.

>  I also support the real fix of improving the quality of every module, but that’s longer-term. :)

Having the sources on "public display" may help achieving this goal.

> 4: “Show Source” is a link that is easily overlooked IMO, a seealso section makes me think people
> will actually see the link.

A side-bar link may be in addition to the more prominent but less
common "See also" links.  If the source navigation becomes available,
we can also add inconspicuous links to function sectoins that would
take you directly to the function source code.
msg125821 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-01-09 03:16
I'm curious as to how the experiment is being carried out and how conclusions will be drawn.
msg125879 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-01-10 03:26
Removed the wordy and bright yellow boxes.
Replace with single source link just below the section heading.
Style modeled after that used in the Go language docs http://golang.org/pkg/container/heap/

See r87898.
History
Date User Action Args
2022-04-11 14:57:11adminsetgithub: 55067
2011-01-10 03:26:51rhettingersetstatus: open -> closed

messages: + msg125879
resolution: fixed
nosy: rhettinger, belopolsky, pitrou, benjamin.peterson, eric.araujo, r.david.murray, docs@python
2011-01-09 03:16:27benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg125821
2011-01-07 21:52:00belopolskysetnosy: rhettinger, belopolsky, pitrou, eric.araujo, r.david.murray, docs@python
messages: + msg125717
2011-01-07 21:32:20eric.araujosetnosy: + eric.araujo
messages: + msg125713
2011-01-07 21:30:52pitrousetnosy: rhettinger, belopolsky, pitrou, r.david.murray, docs@python
messages: + msg125712
2011-01-07 21:17:58belopolskysetnosy: + belopolsky

messages: + msg125711
title: Make source code links less proeminent -> Make source code links less prominent
2011-01-07 19:56:44pitrousetnosy: rhettinger, pitrou, r.david.murray, docs@python
messages: + msg125700
2011-01-07 19:51:37rhettingersetnosy: rhettinger, pitrou, r.david.murray, docs@python
messages: + msg125699
2011-01-07 19:40:06r.david.murraysetnosy: + r.david.murray
messages: + msg125692
2011-01-07 19:37:32rhettingersetassignee: docs@python -> rhettinger
nosy: rhettinger, pitrou, docs@python
2011-01-07 18:09:27pitroucreate