You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/birkenfeld'closed_at=<Date2008-12-27.18:20:43.864>created_at=<Date2008-12-24.17:37:45.327>labels= ['type-feature', 'docs']
title="[patch] Let users do help('@') and so on for confusing syntax constructs."updated_at=<Date2008-12-27.18:20:43.863>user='https://bugs.python.org/alsuren'
When I first came across decorators (about a year ago?), they confused
the hell out of me, and the syntax is completely google-proof, so I
ended up having to ask on irc.
One of the things that I tried was help('@') but that didn't work
either. This patch is to make that work, and also a lot of other
google-proof syntax constructs.
Notes on the patch
==================
I've tried to do it with as few changes/duplications as possible, but my
style is quite different from the rest of the module. I hereby donate my
code to whoever wants to commit it. Do what you want with it, and clean
it up however you want. I'm doing it for the n00bs.
The patch is against pydoc.py from python 2.5.2-0ubuntu1. If you want me
to create a patch against another version of python, send me an email.
Otherwise, apply it by hand: I've tried to make as few changes as
possible, so it shouldn't be too tricky.
Notes on other versions of Python
=================================
Python 3000 (and maybe 2.6? I've not checked) has the note:
# CAUTION: if you change one of these dictionaries, be sure to adapt the
# list of needed labels in Doc/tools/sphinxext/pyspecific.py and
# regenerate the pydoc_topics.py file by running
# make pydoc-topics
# in Doc/ and copying the output file into the Lib/ directory.
but all I'm doing is adding aliases, so you shouldn't need to rebuild
the docs just to get help() working. Note that I've not actually tested
this though.
To test, I did:
python -c 'import pydoc ; help(":=")' | grep 'no Python documentation
found for .*'
which should print:
no Python documentation found for ':='
and:
python -c 'import pydoc ; [help(k) for k in pydoc.help.symbols]' | grep
-c 'no Python documentation found for .*'
which should print nothing.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: