Python에 내장된 도움말 기능에 대한 자세한 소개
영어 문서:
help
([object])
내장 도움말 시스템을 호출합니다. (이 함수는 대화형 사용을 위한 것입니다.) 인수가 지정되지 않은 경우 인수가 다음과 같은 경우 대화형 도움말 시스템이 시작됩니다. 문자열인 경우 문자열은 모듈, 함수, 클래스, 메소드, 키워드 또는 문서 항목의 이름으로 조회되고 인수가 다른 종류의 객체인 경우 도움말 페이지가 콘솔에 인쇄됩니다. 개체에 대한 페이지가 생성됩니다.
이 함수는 site
모듈에 의해 내장 네임스페이스에 추가됩니다.
설명:
1. 인터프리터 대화형 인터페이스에서 매개변수를 전달하지 않고 함수를 호출하면 내장 도움말 시스템이 활성화되고 도움말 시스템으로 들어갑니다. 도움말 시스템 내에 모듈, 클래스, 함수 등의 이름을 입력하면 해당 사용 지침이 표시됩니다. 내장 도움말 시스템을 종료하고 대화형 인터페이스로 돌아가려면 quit를 입력합니다.
>>> help() #不带参数 Welcome to Python 3.5's help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/3.5/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> str #str的帮助信息 Help on class str in module builtins: class str(object) | str(object='') -> str | str(bytes_or_buffer[, encoding[, errors]]) -> str | | Create a new string object from the given object. If encoding or | errors is specified, then the object must expose a data buffer | that will be decoded using the given encoding and error handler. | Otherwise, returns the result of object.__str__() (if defined) | or repr(object). | encoding defaults to sys.getdefaultencoding(). | errors defaults to 'strict'. | | Methods defined here: | | __add__(self, value, /) | Return self+value. ................................ help> 1 #不存在的模块名、类名、函数名 No Python documentation found for '1'. Use help() to get the interactive help utility. Use help(str) for help on the str class. help> quit #退出内置帮助系统 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. # 已退出内置帮助系统,返回交互界面 help> 变成 >>> >>>
2. 인터프리터 대화형 인터페이스에서는 매개변수를 전달하여 함수를 호출할 때 매개변수가 모듈 이름, 클래스 이름, 함수 이름인지 확인합니다. 표시됩니다.
아아아아
위 내용은 Python에 내장된 도움말 기능에 대한 자세한 소개의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Linux 터미널에서 Python 버전을 보려고 할 때 Linux 터미널에서 Python 버전을 볼 때 권한 문제에 대한 솔루션 ... Python을 입력하십시오 ...

10 시간 이내에 컴퓨터 초보자 프로그래밍 기본 사항을 가르치는 방법은 무엇입니까? 컴퓨터 초보자에게 프로그래밍 지식을 가르치는 데 10 시간 밖에 걸리지 않는다면 무엇을 가르치기로 선택 하시겠습니까?

Python의 Pandas 라이브러리를 사용할 때는 구조가 다른 두 데이터 프레임 사이에서 전체 열을 복사하는 방법이 일반적인 문제입니다. 두 개의 dats가 있다고 가정 해

Fiddlerevery Where를 사용할 때 Man-in-the-Middle Reading에 Fiddlereverywhere를 사용할 때 감지되는 방법 ...

Uvicorn은 HTTP 요청을 어떻게 지속적으로 듣습니까? Uvicorn은 ASGI를 기반으로 한 가벼운 웹 서버입니다. 핵심 기능 중 하나는 HTTP 요청을 듣고 진행하는 것입니다 ...

파이썬에서 문자열을 통해 객체를 동적으로 생성하고 메소드를 호출하는 방법은 무엇입니까? 특히 구성 또는 실행 해야하는 경우 일반적인 프로그래밍 요구 사항입니다.

Linux 터미널에서 Python 사용 ...
