473,432 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,432 software developers and data experts.

Documentation suggestions

Here are some thoughts on reorganizing Python's documentation, with
one big suggestion.

The tutorial seems to be in pretty good shape because Raymond
Hettinger has been keeping it up to date. It doesn't cover
everything, but it's a solid introduction, and if people don't find it
works for them, they have lots of alternative books. No suggestions
here.

There are endless minor bugs in the library reference, but that seems
unavoidable. It documents many different and shifting modules, and
what to document is itself a contentious issue, so I don't think the
stream of small problems will ever cease.

There's another struggle within the LibRef: is it a reference or a
tutorial? Does it list methods in alphabetical order so you can look
them up, or does it list them in a pedagogically useful order? I
think it has to be a reference; if each section were to be a tutorial,
the manual would be huge. Here I think the solution is to encourage
separate tutorials and HOWTOs, and link to them from the LibRef.

The library reference has so many modules that the table of contents
is very large. Again, not really a problem that we can fix; splitting
it up into separate manuals doesn't seem like it would help.

The Extending/Embedding manual isn't great, but only advanced users
will come in contact with it, so I don't think it's a critical factor.
(Michael Hudson's new manual is a promising replacement.)

I suspect the Achilles' heel of the docs is the Language Reference.
Put aside the fact that it's not up to date with new-style classes and
other stuff; that would be fixable with some effort.

To some degree, the guide is trying to be very formal; it's written
like a specification for an implementor, not a document that people
would read through. But there's no other way for people to learn
about all the special object methods like __add__; the tutorial can't
cover them all, and the LibRef doesn't describe them. So the newbie
is stuck.

For example, I noticed this passing reference in Tim Bray's weblog:
http://www.tbray.org/ongoing/When/200x/2005/08/27/Ruby

Based on first impressions and light exposure (a basis that
matters a lot) Ruby seems better-documented and easier to get
into than Python. I've actually written (a little)
production code in Python, but I always had the feeling that
there was lots of stuff going on I didn't understand; a
couple of days in, I think I have a better grasp on what
Ruby's up to, even where I'm not looking.

I don't know exactly what Bray meant, but suspect that a more readable
reference guide would have helped him understand what was going on.

Perhaps we need a friendlier counterpart to the RefGuide, something
like the 20-page introduction to Python at the beginning of Beazley's
Essential Reference:

* go over the statements one-by-one
* go over the basic types and their methods
* go over object semantics
* cover some of the lexical material in chapter 2 of the RefGuide
* overarching principles: go into a fair bit of detail, but
not every corner case; make the text readable, not meticulously
precise.

(I should point out: this suggestion is not entirely different from
some of the suggestions that X*h L** has made. He (?) makes his
suggestions in a venomous style, and with his own eccentric
terminology, but that doesn't mean he's always wrong, e.g. his
complaints about the re module's documentation are well-placed in the
main.)

One problem with such a friendly document: it might make the Ref Guide
even more irrelevant, if we always updated the friendly document
(which is easy) and left the RefGuide to drift even further out of
date (because it's hard to update). I don't know if this is an
argument for not having a friendly guide, or for dumping the RefGuide
entirely.

Dumping the RefGuide means there isn't a more formal-style description
of Python's semantics. I don't know if this matters. In theory, the
implementors of Jython or IronPython could be using the RefGuide to
know what they need to implement, but in practice I suspect
implementors use the test suite and existing library as checks. Maybe
we don't really need a tediously precise description of Python.

What do people think?

--amk

Dec 6 '05
62 2343
"BartlebyScrivener" <rp*******@gmail.com> writes:
Too bad there
isn't something like what Ruby does with the "Try Ruby In Your Browser"
thing, which is a very effective marketing tool (although obviously I
chose Python).

http://tryruby.hobix.com/


I've seen things like this for other language as well. Doing it in
for Python isn't all that hard.

The question is how do you keep the system that the Python code is
actually running on safe? Ruby may have a real bastion mode, but
Python doesn't.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Dec 8 '05 #51
In article <86************@bhuda.mired.org>, Mike Meyer <mw*@mired.org> wrote:
"BartlebyScrivener" <rp*******@gmail.com> writes:

Too bad there
isn't something like what Ruby does with the "Try Ruby In Your Browser"
thing, which is a very effective marketing tool (although obviously I
chose Python).

http://tryruby.hobix.com/


I've seen things like this for other language as well. Doing it in
for Python isn't all that hard.

The question is how do you keep the system that the Python code is
actually running on safe? Ruby may have a real bastion mode, but
Python doesn't.


Just run the Python code chrooted.
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

"Don't listen to schmucks on USENET when making legal decisions. Hire
yourself a competent schmuck." --USENET schmuck (aka Robert Kern)
Dec 9 '05 #52
[Mike Meyer wrote]
"BartlebyScrivener" <rp*******@gmail.com> writes:
Too bad there
isn't something like what Ruby does with the "Try Ruby In Your Browser"
thing, which is a very effective marketing tool (although obviously I
chose Python).

http://tryruby.hobix.com/


I've seen things like this for other language as well. Doing it in
for Python isn't all that hard.

The question is how do you keep the system that the Python code is
actually running on safe? Ruby may have a real bastion mode, but
Python doesn't.


Nah, the Try Ruby thing is mostly faking it (I believe) rather than
running an actually Ruby interactive session ("bastion'ed" or not).

Trent

--
Trent Mick
Tr****@ActiveState.com
Dec 9 '05 #53

Mike> The question is how do you keep the system that the Python code is
Mike> actually running on safe? Ruby may have a real bastion mode, but
Mike> Python doesn't.

User Mode Linux? chroot?

Skip
Dec 9 '05 #54

Trent> Nah, the Try Ruby thing is mostly faking it (I believe) rather
Trent> than running an actually Ruby interactive session ("bastion'ed"
Trent> or not).

I don't think so. I tried typing some stuff at the prompt that it wasn't
asking for, like "x = [1,2,3]" followed by "x * 5" when it was asking me to
type "2 + 6". It evaluated both properly as far as I could tell. OTOH, it
hung when I entered "def fib(n)". Never got to the next prompt. Looking at
the Javascript, it appears to be some sort of Ajaxian thing...

Skip

Dec 9 '05 #55
On Thu, 08 Dec 2005 18:43:56 -0500
Mike Meyer <mw*@mired.org> wrote:
"BartlebyScrivener" <rp*******@gmail.com> writes:
Too bad there
isn't something like what Ruby does with the "Try Ruby
In Your Browser" thing, which is a very effective
marketing tool (although obviously I chose Python).

http://tryruby.hobix.com/


I've seen things like this for other language as well.
Doing it in for Python isn't all that hard.

The question is how do you keep the system that the Python
code is actually running on safe? Ruby may have a real
bastion mode, but Python doesn't.


Should be able to use Jython and run on the visitor's
machine, shouldn't you?

--
Terry Hancock (ha*****@AnansiSpaceworks.com)
Anansi Spaceworks http://www.AnansiSpaceworks.com

Dec 9 '05 #56
You guys are all wizards from mars. If it's easy to do I can tell you
that it would very seductive to a prospective Pythoner, and you avoid
the problem of making them download before they can try out a tutorial.
Thanks for looking at it.

rd

Dec 9 '05 #57
[sk**@pobox.com wrote]

Trent> Nah, the Try Ruby thing is mostly faking it (I believe) rather
Trent> than running an actually Ruby interactive session ("bastion'ed"
Trent> or not).

I don't think so. I tried typing some stuff at the prompt that it wasn't
asking for, like "x = [1,2,3]" followed by "x * 5" when it was asking me to
type "2 + 6". It evaluated both properly as far as I could tell.
Yah. My guess at what he is doing (and the way I'd probably do this for
Python) is to compile each statement, only allow certain constructs
(like assigning to a variable, defining literals, basic operator usage,
maybe some control flow statements -- although I didn't get that far)
and then execute those.
OTOH, it
hung when I entered "def fib(n)". Never got to the next prompt.
Punted on continued/multi-line statements maybe?
Looking at
the Javascript, it appears to be some sort of Ajaxian thing...


Yup.
Trent

--
Trent Mick
Tr****@ActiveState.com
Dec 9 '05 #58
Trent Mick <tr****@ActiveState.com> writes:
[sk**@pobox.com wrote]
Trent> Nah, the Try Ruby thing is mostly faking it (I believe) rather
Trent> than running an actually Ruby interactive session ("bastion'ed"
Trent> or not).
I don't think so. I tried typing some stuff at the prompt that it wasn't
asking for, like "x = [1,2,3]" followed by "x * 5" when it was asking me to
type "2 + 6". It evaluated both properly as far as I could tell.

Yah. My guess at what he is doing (and the way I'd probably do this for
Python) is to compile each statement, only allow certain constructs
(like assigning to a variable, defining literals, basic operator usage,
maybe some control flow statements -- although I didn't get that far)
and then execute those.


I'm working on puttingn this up for Python. I'm planning on using AJAX
to pass the input string to eval on the server. I.e. - you'll be
limited to expressions, which is what it seems like the Ruby thing is
limited to.

On the other hand, with iterators, generators and list comprehensions,
you can do quite a lot with eval.

If anyone else is contemplating putting up something like this, let me
know so we can avoijd duplicating the effort.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Dec 9 '05 #59
Mike Meyer <mw*@mired.org> writes:
I'm working on puttingn this up for Python. I'm planning on using AJAX
to pass the input string to eval on the server. I.e. - you'll be
limited to expressions, which is what it seems like the Ruby thing is
limited to.

On the other hand, with iterators, generators and list comprehensions,
you can do quite a lot with eval.


How will you stop the server from getting hosed?
Dec 9 '05 #60
Paul Rubin <http://ph****@NOSPAM.invalid> writes:
Mike Meyer <mw*@mired.org> writes:
I'm working on puttingn this up for Python. I'm planning on using AJAX
to pass the input string to eval on the server. I.e. - you'll be
limited to expressions, which is what it seems like the Ruby thing is
limited to.
On the other hand, with iterators, generators and list comprehensions,
you can do quite a lot with eval.

How will you stop the server from getting hosed?


Still working on that. If I can't, it won't happen.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Dec 10 '05 #61
Mike,

This is probably a dumb thing to suggest, but I'm interested in knowing
why it's dumb, if that makes sense?

Could you use one of those free VMWare players? It makes a virtual
operating system within an operating system as I understand it.

http://www.vmware.com/products/player/

I just think it's cool that somebody tries to make a Try Python In Your
Browser toy. You'll convert the multitudes to Python.

Let me know if you want any help creating the messages for the complete
idiot

rd
www.dooling.com

"The question is not whether machines think, but whether men do."--B.F.
Skinner

Dec 10 '05 #62
On 8 Dec 2005 08:00:25 -0800,
BartlebyScrivener <rp*******@gmail.com> wrote:
The bulleted points in BeginnersGuide/Overview are, again, things that
are important to programmers ("Automatic garbage collection frees you
from the hassles of memory management" means nothing to me, even now
after reading a Python book and several tutorials).


I've reworked Overview to use more straightforward language, and to
break out the programming-language features into a separate list.
Maybe that will help.

--amk
Dec 13 '05 #63

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brian Quinlan | last post by:
I was wondering if there is a system available that serves Python documentation from a CGI script. I want to use such a system internally at my company so we can browse documentation for our...
0
by: Michael Klose | last post by:
Hi, not sure if this is the right group, if not, please post a followup to the right group. Basically, what I would like to do is to produce a documentation cdrom, but which has a full text...
0
by: Terry Hancock | last post by:
I've been trying to use "happydoc" to document a source tree that I'm working on. It does pretty much what I want, except: Version 2.1: Creates a weird directory structure for the HTML pages...
10
by: Colleyville Alan | last post by:
I am looking for a shareware program to document an app and I really do not like the built-in documentation in Access. FMS Total Access Analyzer looks great, but it's way too pricey. I have seen...
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
6
by: kpd | last post by:
Hello, I have written a C++ library that I've then wrapped with Pyrex. Any suggestions to the best-in-class tool to create documentation for the libraries? I would love to document things in...
34
by: nicolasfr | last post by:
Hi, I am a bit disapointed with the current Python online documentation. I have read many messages of people complaining about the documentation, it's lack of examples and the use of complicated...
4
by: Coleen | last post by:
Hi All :-) I'm not sure where to post this, but my organization is looking for a good software application that is not terribly expensive that allows you to create documentationand help files and...
9
by: Mythran | last post by:
Can someone please point me to some articles explaining how to convert the code comment xml files into MSDN documentation? I've made some modifications to Enterprise Library and would like to...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.