Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17586
| References | <06423dd7-4fbb-4e7a-b529-e697ea862b05@f11g2000yql.googlegroups.com> <CABicbJ+1LBMViLa=+KbvnUmU2-_zA+JSaxrknhnfPYFPRZC1Fw@mail.gmail.com> <mailman.3855.1324369780.27778.python-list@python.org> <0b479489-8dab-488c-81e8-f15ae2804234@z17g2000vbe.googlegroups.com> |
|---|---|
| Date | 2011-12-21 02:51 +1100 |
| Subject | Re: Python education survey |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3867.1324396305.27778.python-list@python.org> (permalink) |
On Wed, Dec 21, 2011 at 1:45 AM, Rick Johnson
<rantingrickjohnson@gmail.com> wrote:
> Heck for most things,
> considering you have at least basic programming experience, the help
> function is all you need to learn the language.
I know I shouldn't feed the troll, but this is more general.
You cannot learn the _language_ from help() - it's more like a
dictionary. You still need something that explains the grammar, and
you also need to have some ideas of what names to look up.
The help() function in Python is actually not as helpful as could be
desired, in many cases. I think "help()" on its own is probably a good
thing, but... I didn't know about it until I tried it right while
typing up this email. (That's probably my fault more than Python's,
though.)
help(functionname) is usually fairly helpful - but most of that is
just from the function's docstring. Unfortunately help(classname) and
help(modulename) are way too spammy to be much use. Look for instance
at help(decimal.Decimal) - quite a few dunder methods are listed,
uselessly. What does "__deepcopy__(self, memo)" do? What about
"__ge__(self, other, context=None)"? Unless you happen to know that
__ge__ is the greater-than-or-equal function, it's not going to do you
much good to see the method listed. They're just spam, forcing you to
read through more screed to figure out what's going on.
Same, and even worse, with modules - help(decimal) is pages and pages
of text, detailing the exceptions supported etc. Unlike the class's,
though, the module's docstring is actually quite helpful. (It also
hints at what the context=None arguments are on a lot of the methods.)
Please note that this is not a criticism of the decimal module
specifically; and the help() function can't really be written any
other way, short of having it emit ONLY docstrings, and then demand
that module authors maintain perfect class and module docstrings (like
that's gonna happen).
Hmm. Another feature I didn't know about help() - instead of passing
it an object, you can pass it a string. This gets around the fact that
"help(class)" doesn't work - "help('class')" does. I think I should
reword this from "possible feature request" to "does this already
exist", because it probably does... so...
Is there a less spammy documentation utility, in-built into Python?
Chris Angelico
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python education survey Raymond Hettinger <raymond.hettinger@gmail.com> - 2011-12-19 19:51 -0800
Re: Python education survey Alec Taylor <alec.taylor6@gmail.com> - 2011-12-20 17:27 +1100
Re: Python education survey Luka Dornhecker <luka.dornhecker@googlemail.com> - 2011-12-19 23:20 -0800
Re: Python education survey Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-12-20 02:32 -0500
Re: Python education survey Stefan Behnel <stefan_ml@behnel.de> - 2011-12-20 09:14 +0100
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-20 03:02 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-20 06:45 -0800
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2011-12-21 02:51 +1100
Re: Python education survey Andrea Crotti <andrea.crotti.0@gmail.com> - 2011-12-20 10:58 +0000
Re: Python education survey Carl Smith <carl.input@gmail.com> - 2011-12-26 21:59 -0800
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-27 03:41 -0800
Re: Python education survey Lie Ryan <lie.1296@gmail.com> - 2011-12-28 04:53 +1100
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-27 11:45 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 12:04 -0800
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-27 13:44 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 17:56 -0800
Re: Python education survey Tim Chase <python.list@tim.thechases.com> - 2011-12-27 20:21 -0600
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 18:42 -0800
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2011-12-28 14:54 +1100
Re: Python education survey Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-28 06:59 +0000
Re: Python education survey rusi <rustompmody@gmail.com> - 2011-12-27 23:49 -0800
Re: Python education survey Grant Edwards <invalid@invalid.invalid> - 2011-12-31 16:27 +0000
Re: Python education survey Roy Smith <roy@panix.com> - 2011-12-31 13:23 -0500
Re: Python education survey Alexander Kapps <alex.kapps@web.de> - 2011-12-31 20:06 +0100
Re: Python education survey Grant Edwards <invalid@invalid.invalid> - 2012-01-01 02:36 +0000
Re: Python education survey Alexander Kapps <alex.kapps@web.de> - 2012-01-01 05:53 +0100
Re: Python education survey Grant Edwards <invalid@invalid.invalid> - 2012-01-02 17:02 +0000
Re: Python education survey Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-31 23:44 -0600
Re: Python education survey Dominic Binks <dbinks@codeaurora.org> - 2011-12-31 21:12 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-02 21:27 -0800
Re: Python education survey Dominic Binks <dbinks@codeaurora.org> - 2012-01-02 22:03 -0800
Re: Python education survey Evan Driscoll <edriscoll@wisc.edu> - 2012-01-03 01:31 -0500
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2012-01-03 04:33 -0800
Re: Python education survey Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-04 01:30 +0000
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2012-01-01 16:50 +1100
Re: Python education survey Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-28 04:25 -0800
Re: Python education survey Miki Tebeka <miki.tebeka@gmail.com> - 2011-12-20 10:07 -0800
Re: Python education survey Fernando Perez <fperez.net@gmail.com> - 2011-12-21 01:40 +0000
Re: Python education survey Ashton Fagg <ashton@fagg.id.au> - 2011-12-21 12:06 +1000
Re: Python education survey Roy Smith <roy@panix.com> - 2011-12-20 21:34 -0500
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2011-12-21 13:44 +1100
Re: Python education survey Nathan Rice <nathan.alexander.rice@gmail.com> - 2011-12-21 11:57 -0500
Re: Python education survey Raymond Hettinger <raymond.hettinger@gmail.com> - 2011-12-22 12:01 -0800
Re: Python education survey rusi <rustompmody@gmail.com> - 2011-12-22 19:05 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-25 09:44 -0800
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2011-12-26 14:27 +1100
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-26 06:52 -0800
Re: Python education survey Nathan Rice <nathan.alexander.rice@gmail.com> - 2011-12-26 11:11 -0500
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-26 09:27 -0800
Re: Python education survey Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-26 18:04 +0000
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-26 10:32 -0800
Re: Python education survey Chris Angelico <rosuav@gmail.com> - 2011-12-27 06:56 +1100
Re: Python education survey Carl Smith <carl.input@gmail.com> - 2011-12-26 22:14 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 08:37 -0800
Re: Python education survey Lie Ryan <lie.1296@gmail.com> - 2011-12-28 04:50 +1100
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 10:11 -0800
Re: Python education survey Lie Ryan <lie.1296@gmail.com> - 2011-12-28 08:13 +1100
Re: Python education survey Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-27 14:31 -0700
Re: Python education survey Monte Milanuk <memilanuk@gmail.com> - 2011-12-25 22:02 -0800
Re: Python education survey K Richard Pixley <rich@noir.com> - 2011-12-27 09:59 -0800
Re: Python education survey Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-27 12:26 -0600
Re: Python education survey K Richard Pixley <rich@noir.com> - 2011-12-27 14:04 -0800
Re: Python education survey Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-27 16:57 -0600
Re: Python education survey 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-27 17:21 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 18:01 -0800
Re: Python education survey 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-27 17:21 -0800
Re: Python education survey rusi <rustompmody@gmail.com> - 2011-12-27 21:50 -0800
Re: Python education survey Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-27 10:21 -0800
Re: Python education survey K Richard Pixley <rich@noir.com> - 2011-12-27 12:39 -0800
csiph-web