Python解釋器環境與選項
Python解釋器環境變量
python 文檔字符串
doctest模塊
可以測試模塊字符串文檔正確性的測試:
dir(doctest)
[‘BLANKLINE_MARKER’, ‘COMPARISON_FLAGS’, ‘DONT_ACCEPT_BLANKLINE’, ‘DONT_ACCEPT_TRUE_FOR_1’, ‘DebugRunner’, ‘DocFileCase’, ‘DocFileSuite’, ‘DocFileTest’, ‘DocTest’, ‘DocTestCase’, ‘DocTestFailure’, ‘DocTestFinder’, ‘DocTestParser’, ‘DocTestRunner’, ‘DocTestSuite’, ‘ELLIPSIS’, ‘ELLIPSIS_MARKER’, ‘Example’, ‘FAIL_FAST’, ‘IGNORE_EXCEPTION_DETAIL’, ‘NORMALIZE_WHITESPACE’, ‘OPTIONFLAGS_BY_NAME’, ‘OutputChecker’, ‘REPORTING_FLAGS’, ‘REPORT_CDIFF’, ‘REPORT_NDIFF’, ‘REPORT_ONLY_FIRST_FAILURE’, ‘REPORT_UDIFF’, ‘SKIP’, ‘SkipDocTestCase’, ‘StringIO’, ‘TestResults’, ‘UnexpectedException’, ‘_DocTestSuite’, ’ _ OutputRedirectingPdb’, ‘_SpoofOut’, ‘_TestClass’, ’ __ al l __ ‘, ’ __ builtins __ ‘, ’ __ cached __’, ’ __ doc __’, ’ __ docformat __ ‘, ’ __ file __’, ’ __ future __ ‘, ’ __ loader __’, ’ __ name __ ', ’ __ package __ ', ’ __ spec __ ', ’ __ test __ ', ‘_comment_line’, ‘_ellipsis_match’, ‘_exception_traceback’, ‘_extract_future_flags’, ‘_indent’, ‘_load_testfile’, ‘_module_relative_path’, ‘_normalize_module’, ‘_strip_exception_details’, ‘_test’, ‘_unittest_reportflags’, ‘argparse’, ‘debug’, ‘debug_script’, ‘debug_src’, ‘difflib’, ‘inspect’, ‘linecache’, ‘master’, ‘namedtuple’, ‘os’, ‘pdb’, ‘re’, ‘register_optionflag’, ‘run_docstring_examples’, ‘script_from_examples’, ‘set_unittest_reportflags’, ‘sys’, ‘testfile’, ‘testmod’, ‘testsource’, ‘traceback’, ‘unittest’]
完結
python 基礎簡介完成,後續可能會繼續更新。