Invalid help message inside interactive help utility

Đang mở
#94,466 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Bắt đầu từ tiện ích trợ giúp tương tác thông qua điểm vào help() và tái hiện help> help(help), so sánh với >>> help(help). Được xem là hoàn tất khi lời nhắc trợ giúp đưa ra chẩn đoán hữu ích có nhận biết ngữ cảnh thay vì báo rằng không tìm thấy tài liệu; issue không nêu tệp hoặc bài kiểm thử nào cần chạy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

stdlib topic-repl

Documentation

From REPL, >>> help(help) produces valid output.

From inside interactive help utility, help> help(help), produces less useful output.

I suppose I would have expected something like, "cannot use help() inside of help(), use help instead".

Here is an example.

~$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help(help)

>>> help() # works as expected

Welcome to Python 3.10's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the internet at https://docs.python.org/3.10/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> help(help)
No Python documentation found for 'help(help)'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

# typing just help works as expected
help> 
You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
>>> 
Linked PRs
  • gh-148863
Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
558

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python/cpython

Tất cả issue của python/cpython

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.