| route-pattern | /:user_id/:repository |
| route-controller | files |
| route-action | disambiguate |
| fetch-nonce | v2:4dcb0f08-96f6-fb4e-4b8b-a21fa62e8cda |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | B4DA:D73F2:319E8:4456D:696A98A8 |
| html-safe-nonce | 082539604788fd42684f74dcc7901cc0dc701e585b4c9410e52ae1fdc318aa6c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNERBOkQ3M0YyOjMxOUU4OjQ0NTZEOjY5NkE5OEE4IiwidmlzaXRvcl9pZCI6IjE4NDUyMDA0MjgzODcxNzg2NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 79efe2c3d598a7a67e6faca8c864c892c2e6aa1e7a786fd70eb50fb83eff48cd |
| hovercard-subject-tag | repository:169056989 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | // |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/stringmumu/wtfpython-cn |
| twitter:image | https://opengraph.githubassets.com/a58bea4e666a7bc9b23887f263cee366ce81fa22d65daef7be7170e7ea85161c/stringmumu/wtfpython-cn |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a58bea4e666a7bc9b23887f263cee366ce81fa22d65daef7be7170e7ea85161c/stringmumu/wtfpython-cn |
| og:image:alt | wtfpython的中文翻译/施工结束/ 能力有限,欢迎帮我改进翻译. Contribute to stringmumu/wtfpython-cn development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0d8175e41e0e55b9e984c935b24b808cabab919dd3174aa45dac3ef503ed1af |
| turbo-cache-control | no-preview |
| go-import | github.com/stringmumu/wtfpython-cn git https://github.com/stringmumu/wtfpython-cn.git |
| octolytics-dimension-user_id | 8307651 |
| octolytics-dimension-user_login | stringmumu |
| octolytics-dimension-repository_id | 169056989 |
| octolytics-dimension-repository_nwo | stringmumu/wtfpython-cn |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 156967161 |
| octolytics-dimension-repository_parent_nwo | leisurelicht/wtfpython-cn |
| octolytics-dimension-repository_network_root_id | 156967161 |
| octolytics-dimension-repository_network_root_nwo | leisurelicht/wtfpython-cn |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 99aab454e5ddc8df30805fb76c114c3008a15842 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/stringmumu/wtfpython-cn#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstringmumu%2Fwtfpython-cn |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstringmumu%2Fwtfpython-cn |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=stringmumu%2Fwtfpython-cn |
| Reload | https://github.com/stringmumu/wtfpython-cn |
| Reload | https://github.com/stringmumu/wtfpython-cn |
| Reload | https://github.com/stringmumu/wtfpython-cn |
|
stringmumu
| https://github.com/stringmumu |
| wtfpython-cn | https://github.com/stringmumu/wtfpython-cn |
| leisurelicht/wtfpython-cn | https://github.com/leisurelicht/wtfpython-cn |
|
Notifications
| https://github.com/login?return_to=%2Fstringmumu%2Fwtfpython-cn |
|
Fork
0
| https://github.com/login?return_to=%2Fstringmumu%2Fwtfpython-cn |
|
Star
0
| https://github.com/login?return_to=%2Fstringmumu%2Fwtfpython-cn |
| github.com/leisurelicht/wtfpython-cn/blob/master/CONTRIBUTING.md | https://github.com/leisurelicht/wtfpython-cn/blob/master/CONTRIBUTING.md |
|
0
stars
| https://github.com/stringmumu/wtfpython-cn/stargazers |
|
2k
forks
| https://github.com/stringmumu/wtfpython-cn/forks |
|
Branches
| https://github.com/stringmumu/wtfpython-cn/branches |
|
Tags
| https://github.com/stringmumu/wtfpython-cn/tags |
|
Activity
| https://github.com/stringmumu/wtfpython-cn/activity |
|
Star
| https://github.com/login?return_to=%2Fstringmumu%2Fwtfpython-cn |
|
Notifications
| https://github.com/login?return_to=%2Fstringmumu%2Fwtfpython-cn |
|
Code
| https://github.com/stringmumu/wtfpython-cn |
|
Pull requests
0
| https://github.com/stringmumu/wtfpython-cn/pulls |
|
Actions
| https://github.com/stringmumu/wtfpython-cn/actions |
|
Projects
0
| https://github.com/stringmumu/wtfpython-cn/projects |
|
Security
Uh oh!
There was an error while loading. Please reload this page.
| https://github.com/stringmumu/wtfpython-cn/security |
| Please reload this page | https://github.com/stringmumu/wtfpython-cn |
|
Insights
| https://github.com/stringmumu/wtfpython-cn/pulse |
|
Code
| https://github.com/stringmumu/wtfpython-cn |
|
Pull requests
| https://github.com/stringmumu/wtfpython-cn/pulls |
|
Actions
| https://github.com/stringmumu/wtfpython-cn/actions |
|
Projects
| https://github.com/stringmumu/wtfpython-cn/projects |
|
Security
| https://github.com/stringmumu/wtfpython-cn/security |
|
Insights
| https://github.com/stringmumu/wtfpython-cn/pulse |
| Branches | https://github.com/stringmumu/wtfpython-cn/branches |
| Tags | https://github.com/stringmumu/wtfpython-cn/tags |
| https://github.com/stringmumu/wtfpython-cn/branches |
| https://github.com/stringmumu/wtfpython-cn/tags |
| 55 Commits | https://github.com/stringmumu/wtfpython-cn/commits/master/ |
| https://github.com/stringmumu/wtfpython-cn/commits/master/ |
| images | https://github.com/stringmumu/wtfpython-cn/tree/master/images |
| images | https://github.com/stringmumu/wtfpython-cn/tree/master/images |
| .gitignore | https://github.com/stringmumu/wtfpython-cn/blob/master/.gitignore |
| .gitignore | https://github.com/stringmumu/wtfpython-cn/blob/master/.gitignore |
| CHANGELOG.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CHANGELOG.md |
| CHANGELOG.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CHANGELOG.md |
| CONTRIBUTING.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CONTRIBUTING.md |
| CONTRIBUTING.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CONTRIBUTING.md |
| CONTRIBUTORS.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CONTRIBUTORS.md |
| CONTRIBUTORS.md | https://github.com/stringmumu/wtfpython-cn/blob/master/CONTRIBUTORS.md |
| README.md | https://github.com/stringmumu/wtfpython-cn/blob/master/README.md |
| README.md | https://github.com/stringmumu/wtfpython-cn/blob/master/README.md |
| mixed_tabs_and_spaces.py | https://github.com/stringmumu/wtfpython-cn/blob/master/mixed_tabs_and_spaces.py |
| mixed_tabs_and_spaces.py | https://github.com/stringmumu/wtfpython-cn/blob/master/mixed_tabs_and_spaces.py |
| README | https://github.com/stringmumu/wtfpython-cn |
| Contributing | https://github.com/stringmumu/wtfpython-cn |
| https://github.com/stringmumu/wtfpython-cn/blob/master/images/logo.png |
| https://github.com/stringmumu/wtfpython-cn#what-the-fck-python- |
| English | https://github.com/satwikkansal/wtfpython |
| 中文 | https://github.com/stringmumu/wtfpython-cn |
| http://www.wtfpl.net |
| https://github.com/satwikkansal/wtfpython/commit/30e05a5973930c38cdb59f1c02b85b19b22ac531 |
| 这里 | https://github.com/satwikkansal/wtfpython/releases/ |
| https://github.com/stringmumu/wtfpython-cn#table-of-contents目录 |
| Table of Contents/目录 | https://github.com/stringmumu/wtfpython-cn#table-of-contents%E7%9B%AE%E5%BD%95 |
| Structure of the Examples/示例结构 | https://github.com/stringmumu/wtfpython-cn#structure-of-the-examples%E7%A4%BA%E4%BE%8B%E7%BB%93%E6%9E%84 |
| Usage/用法 | https://github.com/stringmumu/wtfpython-cn#usage%E7%94%A8%E6%B3%95 |
| 👀 Examples/示例 | https://github.com/stringmumu/wtfpython-cn#-examples%E7%A4%BA%E4%BE%8B |
| Section: Strain your brain!/大脑运动! | https://github.com/stringmumu/wtfpython-cn#section-strain-your-brain%E5%A4%A7%E8%84%91%E8%BF%90%E5%8A%A8 |
| > Strings can be tricky sometimes/微妙的字符串 * | https://github.com/stringmumu/wtfpython-cn#-strings-can-be-tricky-sometimes%E5%BE%AE%E5%A6%99%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2- |
| > Time for some hash brownies!/是时候来点蛋糕了! | https://github.com/stringmumu/wtfpython-cn#-time-for-some-hash-brownies%E6%98%AF%E6%97%B6%E5%80%99%E6%9D%A5%E7%82%B9%E8%9B%8B%E7%B3%95%E4%BA%86 |
| > Return return everywhere!/到处返回! | https://github.com/stringmumu/wtfpython-cn#-return-return-everywhere%E5%88%B0%E5%A4%84%E8%BF%94%E5%9B%9E |
| > Deep down, we're all the same./本质上,我们都一样. * | https://github.com/stringmumu/wtfpython-cn#-deep-down-were-all-the-same%E6%9C%AC%E8%B4%A8%E4%B8%8A%E6%88%91%E4%BB%AC%E9%83%BD%E4%B8%80%E6%A0%B7- |
| > For what?/为什么? | https://github.com/stringmumu/wtfpython-cn#-for-what%E4%B8%BA%E4%BB%80%E4%B9%88 |
| > Evaluation time discrepancy/执行时机差异 | https://github.com/stringmumu/wtfpython-cn#-evaluation-time-discrepancy%E6%89%A7%E8%A1%8C%E6%97%B6%E6%9C%BA%E5%B7%AE%E5%BC%82 |
| > is is not what it is!/出人意料的is! | https://github.com/stringmumu/wtfpython-cn#-is-is-not-what-it-is%E5%87%BA%E4%BA%BA%E6%84%8F%E6%96%99%E7%9A%84is |
| > A tic-tac-toe where X wins in the first attempt!/一蹴即至! | https://github.com/stringmumu/wtfpython-cn#-a-tic-tac-toe-where-x-wins-in-the-first-attempt%E4%B8%80%E8%B9%B4%E5%8D%B3%E8%87%B3 |
| > The sticky output function/麻烦的输出 | https://github.com/stringmumu/wtfpython-cn#-the-sticky-output-function%E9%BA%BB%E7%83%A6%E7%9A%84%E8%BE%93%E5%87%BA |
| > is not ... is not is (not ...)/is not ... 不是 is (not ...) | https://github.com/stringmumu/wtfpython-cn#-is-not--is-not-is-not-is-not--%E4%B8%8D%E6%98%AF-is-not- |
| > The surprising comma/意外的逗号 | https://github.com/stringmumu/wtfpython-cn#-the-surprising-comma%E6%84%8F%E5%A4%96%E7%9A%84%E9%80%97%E5%8F%B7 |
| > Backslashes at the end of string/字符串末尾的反斜杠 | https://github.com/stringmumu/wtfpython-cn#-backslashes-at-the-end-of-string%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%9C%AB%E5%B0%BE%E7%9A%84%E5%8F%8D%E6%96%9C%E6%9D%A0 |
| > not knot!/别纠结! | https://github.com/stringmumu/wtfpython-cn#-not-knot%E5%88%AB%E7%BA%A0%E7%BB%93 |
| > Half triple-quoted strings/三个引号 | https://github.com/stringmumu/wtfpython-cn#-half-triple-quoted-strings%E4%B8%89%E4%B8%AA%E5%BC%95%E5%8F%B7 |
| > Midnight time doesn't exist?/不存在的午夜? | https://github.com/stringmumu/wtfpython-cn#-midnight-time-doesnt-exist%E4%B8%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E5%8D%88%E5%A4%9C |
| > What's wrong with booleans?/布尔你咋了? | https://github.com/stringmumu/wtfpython-cn#-whats-wrong-with-booleans%E5%B8%83%E5%B0%94%E4%BD%A0%E5%92%8B%E4%BA%86 |
| > Class attributes and instance attributes/类属性和实例属性 | https://github.com/stringmumu/wtfpython-cn#-class-attributes-and-instance-attributes%E7%B1%BB%E5%B1%9E%E6%80%A7%E5%92%8C%E5%AE%9E%E4%BE%8B%E5%B1%9E%E6%80%A7 |
| > yielding None/生成 None | https://github.com/stringmumu/wtfpython-cn#-yielding-none%E7%94%9F%E6%88%90-none |
| > Mutating the immutable!/强人所难 | https://github.com/stringmumu/wtfpython-cn#-mutating-the-immutable%E5%BC%BA%E4%BA%BA%E6%89%80%E9%9A%BE |
| > The disappearing variable from outer scope/消失的外部变量 | https://github.com/stringmumu/wtfpython-cn#-the-disappearing-variable-from-outer-scope%E6%B6%88%E5%A4%B1%E7%9A%84%E5%A4%96%E9%83%A8%E5%8F%98%E9%87%8F |
| > When True is actually False/真亦假 | https://github.com/stringmumu/wtfpython-cn#-when-true-is-actually-false%E7%9C%9F%E4%BA%A6%E5%81%87 |
| > From filled to None in one instruction.../从有到无... | https://github.com/stringmumu/wtfpython-cn#-from-filled-to-none-in-one-instruction%E4%BB%8E%E6%9C%89%E5%88%B0%E6%97%A0 |
| > Subclass relationships/子类关系 * | https://github.com/stringmumu/wtfpython-cn#-subclass-relationships%E5%AD%90%E7%B1%BB%E5%85%B3%E7%B3%BB- |
| > The mysterious key type conversion/神秘的键型转换 * | https://github.com/stringmumu/wtfpython-cn#-the-mysterious-key-type-conversion%E7%A5%9E%E7%A7%98%E7%9A%84%E9%94%AE%E5%9E%8B%E8%BD%AC%E6%8D%A2- |
| > Let's see if you can guess this?/看看你能否猜到这一点? | https://github.com/stringmumu/wtfpython-cn#-lets-see-if-you-can-guess-this%E7%9C%8B%E7%9C%8B%E4%BD%A0%E8%83%BD%E5%90%A6%E7%8C%9C%E5%88%B0%E8%BF%99%E4%B8%80%E7%82%B9 |
| Section: Appearances are deceptive!/外表是靠不住的! | https://github.com/stringmumu/wtfpython-cn#section-appearances-are-deceptive%E5%A4%96%E8%A1%A8%E6%98%AF%E9%9D%A0%E4%B8%8D%E4%BD%8F%E7%9A%84 |
| > Skipping lines?/跳过一行? | https://github.com/stringmumu/wtfpython-cn#-skipping-lines%E8%B7%B3%E8%BF%87%E4%B8%80%E8%A1%8C |
| > Teleportation/空间移动 * | https://github.com/stringmumu/wtfpython-cn#-teleportation%E7%A9%BA%E9%97%B4%E7%A7%BB%E5%8A%A8- |
| > Well, something is fishy.../嗯, 有些可疑... | https://github.com/stringmumu/wtfpython-cn#-well-something-is-fishy%E5%97%AF%E6%9C%89%E4%BA%9B%E5%8F%AF%E7%96%91 |
| Section: Watch out for the landmines!/小心地雷! | https://github.com/stringmumu/wtfpython-cn#section-watch-out-for-the-landmines%E5%B0%8F%E5%BF%83%E5%9C%B0%E9%9B%B7 |
| > Modifying a dictionary while iterating over it/迭代字典时的修改 | https://github.com/stringmumu/wtfpython-cn#-modifying-a-dictionary-while-iterating-over-it%E8%BF%AD%E4%BB%A3%E5%AD%97%E5%85%B8%E6%97%B6%E7%9A%84%E4%BF%AE%E6%94%B9 |
| > Stubborn del operator/坚强的 del * | https://github.com/stringmumu/wtfpython-cn#-stubborn-del-operator%E5%9D%9A%E5%BC%BA%E7%9A%84-del- |
| > Deleting a list item while iterating/迭代列表时删除元素 | https://github.com/stringmumu/wtfpython-cn#-deleting-a-list-item-while-iterating%E8%BF%AD%E4%BB%A3%E5%88%97%E8%A1%A8%E6%97%B6%E5%88%A0%E9%99%A4%E5%85%83%E7%B4%A0 |
| > Loop variables leaking out!/循环变量泄漏! | https://github.com/stringmumu/wtfpython-cn#-loop-variables-leaking-out%E5%BE%AA%E7%8E%AF%E5%8F%98%E9%87%8F%E6%B3%84%E6%BC%8F |
| > Beware of default mutable arguments!/当心默认的可变参数! | https://github.com/stringmumu/wtfpython-cn#-beware-of-default-mutable-arguments%E5%BD%93%E5%BF%83%E9%BB%98%E8%AE%A4%E7%9A%84%E5%8F%AF%E5%8F%98%E5%8F%82%E6%95%B0 |
| > Catching the Exceptions/捕获异常 | https://github.com/stringmumu/wtfpython-cn#-catching-the-exceptions%E6%8D%95%E8%8E%B7%E5%BC%82%E5%B8%B8 |
| > Same operands, different story!/同人不同命! | https://github.com/stringmumu/wtfpython-cn#-same-operands-different-story%E5%90%8C%E4%BA%BA%E4%B8%8D%E5%90%8C%E5%91%BD |
| > The out of scope variable/外部作用域变量 | https://github.com/stringmumu/wtfpython-cn#-the-out-of-scope-variable%E5%A4%96%E9%83%A8%E4%BD%9C%E7%94%A8%E5%9F%9F%E5%8F%98%E9%87%8F |
| > Be careful with chained operations/小心链式操作 | https://github.com/stringmumu/wtfpython-cn#-be-careful-with-chained-operations%E5%B0%8F%E5%BF%83%E9%93%BE%E5%BC%8F%E6%93%8D%E4%BD%9C |
| > Name resolution ignoring class scope/忽略类作用域的名称解析 | https://github.com/stringmumu/wtfpython-cn#-name-resolution-ignoring-class-scope%E5%BF%BD%E7%95%A5%E7%B1%BB%E4%BD%9C%E7%94%A8%E5%9F%9F%E7%9A%84%E5%90%8D%E7%A7%B0%E8%A7%A3%E6%9E%90 |
| > Needle in a Haystack/大海捞针 | https://github.com/stringmumu/wtfpython-cn#-needle-in-a-haystack%E5%A4%A7%E6%B5%B7%E6%8D%9E%E9%92%88 |
| Section: The Hidden treasures!/隐藏的宝藏! | https://github.com/stringmumu/wtfpython-cn#section-the-hidden-treasures%E9%9A%90%E8%97%8F%E7%9A%84%E5%AE%9D%E8%97%8F |
| > Okay Python, Can you make me fly?/Python, 可否带我飞? * | https://github.com/stringmumu/wtfpython-cn#-okay-python-can-you-make-me-flypython-%E5%8F%AF%E5%90%A6%E5%B8%A6%E6%88%91%E9%A3%9E- |
| > goto, but why?/goto, 但为什么? * | https://github.com/stringmumu/wtfpython-cn#-goto-but-whygoto-%E4%BD%86%E4%B8%BA%E4%BB%80%E4%B9%88- |
| > Brace yourself!/做好思想准备 * | https://github.com/stringmumu/wtfpython-cn#-brace-yourself%E5%81%9A%E5%A5%BD%E6%80%9D%E6%83%B3%E5%87%86%E5%A4%87- |
| > Let's meet Friendly Language Uncle For Life/让生活更友好 * | https://github.com/stringmumu/wtfpython-cn#-lets-meet-friendly-language-uncle-for-life%E8%AE%A9%E7%94%9F%E6%B4%BB%E6%9B%B4%E5%8F%8B%E5%A5%BD- |
| > Even Python understands that love is complicated/连Python也知道爱是难言的 * | https://github.com/stringmumu/wtfpython-cn#-even-python-understands-that-love-is-complicated%E8%BF%9EPython%E4%B9%9F%E7%9F%A5%E9%81%93%E7%88%B1%E6%98%AF%E9%9A%BE%E8%A8%80%E7%9A%84- |
| > Yes, it exists!/是的, 它存在! | https://github.com/stringmumu/wtfpython-cn#-yes-it-exists%E6%98%AF%E7%9A%84-%E5%AE%83%E5%AD%98%E5%9C%A8 |
| > Inpinity/无限 * | https://github.com/stringmumu/wtfpython-cn#-inpinity%E6%97%A0%E9%99%90- |
| > Mangling time!修饰时间! * | https://github.com/stringmumu/wtfpython-cn#-mangling-time%E4%BF%AE%E9%A5%B0%E6%97%B6%E9%97%B4- |
| Section: Miscellaneous/杂项 | https://github.com/stringmumu/wtfpython-cn#section-miscellaneous%E6%9D%82%E9%A1%B9 |
| > += is faster/更快的 += | https://github.com/stringmumu/wtfpython-cn#--is-faster%E6%9B%B4%E5%BF%AB%E7%9A%84- |
| > Let's make a giant string!/来做个巨大的字符串吧! | https://github.com/stringmumu/wtfpython-cn#-lets-make-a-giant-string%E6%9D%A5%E5%81%9A%E4%B8%AA%E5%B7%A8%E5%A4%A7%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%90%A7 |
| > Explicit typecast of strings/字符串的显式类型转换 | https://github.com/stringmumu/wtfpython-cn#-explicit-typecast-of-strings%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E6%98%BE%E5%BC%8F%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2 |
| > Minor Ones/小知识点 | https://github.com/stringmumu/wtfpython-cn#-minor-ones%E5%B0%8F%E7%9F%A5%E8%AF%86%E7%82%B9 |
| Contributing/贡献 | https://github.com/stringmumu/wtfpython-cn#contributing%E8%B4%A1%E7%8C%AE |
| Acknowledgements/致谢 | https://github.com/stringmumu/wtfpython-cn#acknowledgements%E8%87%B4%E8%B0%A2 |
| 🎓 License/许可 | https://github.com/stringmumu/wtfpython-cn#-license%E8%AE%B8%E5%8F%AF |
| Help/帮助 | https://github.com/stringmumu/wtfpython-cn#help%E5%B8%AE%E5%8A%A9 |
| Surprise your geeky pythonist friends?/想给你的极客朋友一个惊喜? | https://github.com/stringmumu/wtfpython-cn#surprise-your-geeky-pythonist-friends%E6%83%B3%E7%BB%99%E4%BD%A0%E7%9A%84%E6%9E%81%E5%AE%A2%E6%9C%8B%E5%8F%8B%E4%B8%80%E4%B8%AA%E6%83%8A%E5%96%9C |
| Need a pdf version?/需要来一份pdf版的? | https://github.com/stringmumu/wtfpython-cn#need-a-pdf-version%E9%9C%80%E8%A6%81%E6%9D%A5%E4%B8%80%E4%BB%BDpdf%E7%89%88%E7%9A%84 |
| Follow Commit/追踪Commit | https://github.com/stringmumu/wtfpython-cn#follow-commit%E8%BF%BD%E8%B8%AACommit |
| https://github.com/stringmumu/wtfpython-cn#structure-of-the-examples示例结构 |
| https://github.com/stringmumu/wtfpython-cn#-一个精选的标题- |
| https://github.com/stringmumu/wtfpython-cn#-说明 |
| https://github.com/stringmumu/wtfpython-cn#usage用法 |
| 这 | https://github.com/satwikkansal/wtfPython |
| wtfpython | https://www.npmjs.com/package/wtfpython |
| wtfpython | https://pypi.python.org/pypi/wtfpython |
| https://github.com/stringmumu/wtfpython-cn#-examples示例 |
| https://github.com/stringmumu/wtfpython-cn#section-strain-your-brain大脑运动 |
| https://github.com/stringmumu/wtfpython-cn#-strings-can-be-tricky-sometimes微妙的字符串- |
| https://github.com/stringmumu/wtfpython-cn#-说明-1 |
| 这里 | https://github.com/python/cpython/blob/3.6/Objects/codeobject.c#L19 |
| https://github.com/stringmumu/wtfpython-cn/blob/master/images/string-intern/string_intern.png |
| 窥孔优化(peephole optimization) | https://en.wikipedia.org/wiki/Peephole_optimization |
| 这里 | https://github.com/python/cpython/blob/3.6/Python/peephole.c#L288 |
| https://github.com/stringmumu/wtfpython-cn#-time-for-some-hash-brownies是时候来点蛋糕了 |
| https://github.com/stringmumu/wtfpython-cn#-说明-2 |
| 回答 | https://stackoverflow.com/a/32211042/4354153 |
| https://github.com/stringmumu/wtfpython-cn#-return-return-everywhere到处返回 |
| https://github.com/stringmumu/wtfpython-cn#-说明-3 |
| https://github.com/stringmumu/wtfpython-cn#-deep-down-were-all-the-same本质上我们都一样- |
| https://github.com/stringmumu/wtfpython-cn#-说明-4 |
| https://github.com/stringmumu/wtfpython-cn#-for-what为什么 |
| https://github.com/stringmumu/wtfpython-cn#-说明-5 |
| Python 语法 | https://docs.python.org/3/reference/grammar.html |
| https://github.com/stringmumu/wtfpython-cn#-evaluation-time-discrepancy执行时机差异 |
| https://github.com/stringmumu/wtfpython-cn#-说明-6 |
| 生成器 | https://wiki.python.org/moin/Generators |
| https://github.com/stringmumu/wtfpython-cn#-is-is-not-what-it-is出人意料的is |
| https://github.com/stringmumu/wtfpython-cn#-说明-7 |
| https://docs.python.org/3/c-api/long.html | https://docs.python.org/3/c-api/long.html |
| https://github.com/stringmumu/wtfpython-cn#-a-tic-tac-toe-where-x-wins-in-the-first-attempt一蹴即至 |
| https://github.com/stringmumu/wtfpython-cn#-说明-8 |
| https://github.com/stringmumu/wtfpython-cn/blob/master/images/tic-tac-toe/after_row_initialized.png |
| https://github.com/stringmumu/wtfpython-cn/blob/master/images/tic-tac-toe/after_board_initialized.png |
| 这个 | https://github.com/satwikkansal/wtfpython/issues/68 |
| https://github.com/stringmumu/wtfpython-cn#-the-sticky-output-function麻烦的输出 |
| https://github.com/stringmumu/wtfpython-cn#-说明-9 |
| https://github.com/stringmumu/wtfpython-cn#-is-not--is-not-is-not-is-not--不是-is-not- |
| https://github.com/stringmumu/wtfpython-cn#-说明-10 |
| https://github.com/stringmumu/wtfpython-cn#-the-surprising-comma意外的逗号 |
| https://github.com/stringmumu/wtfpython-cn#-说明-11 |
| 修复 | https://bugs.python.org/issue9232 |
| 帖子 | https://bugs.python.org/issue9232#msg248399 |
| https://github.com/stringmumu/wtfpython-cn#-backslashes-at-the-end-of-string字符串末尾的反斜杠 |
| https://github.com/stringmumu/wtfpython-cn#-说明-12 |
| https://github.com/stringmumu/wtfpython-cn#-not-knot别纠结 |
| https://github.com/stringmumu/wtfpython-cn#-说明-13 |
| https://github.com/stringmumu/wtfpython-cn#-half-triple-quoted-strings三个引号 |
| https://github.com/stringmumu/wtfpython-cn#-说明-14 |
| 字符串链接 | https://docs.python.org/2/reference/lexical_analysis.html#string-literal-concatenation |
| https://github.com/stringmumu/wtfpython-cn#-midnight-time-doesnt-exist不存在的午夜 |
| https://github.com/stringmumu/wtfpython-cn#-说明-15 |
| https://github.com/stringmumu/wtfpython-cn#-whats-wrong-with-booleans布尔你咋了 |
| https://github.com/stringmumu/wtfpython-cn#-说明-16 |
| 回答 | https://stackoverflow.com/a/8169049/4354153 |
| https://github.com/stringmumu/wtfpython-cn#-class-attributes-and-instance-attributes类属性和实例属性 |
| https://github.com/stringmumu/wtfpython-cn#-说明-17 |
| https://github.com/stringmumu/wtfpython-cn#-yielding-none生成-none |
| https://github.com/stringmumu/wtfpython-cn#-说明-18 |
| https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions | https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions |
| http://bugs.python.org/issue10544 | http://bugs.python.org/issue10544 |
| https://github.com/stringmumu/wtfpython-cn#-mutating-the-immutable强人所难 |
| https://github.com/stringmumu/wtfpython-cn#-说明-19 |
| https://docs.python.org/2/reference/datamodel.html | https://docs.python.org/2/reference/datamodel.html |
| 这里 | https://segmentfault.com/a/1190000010767068 |
| https://github.com/stringmumu/wtfpython-cn#-the-disappearing-variable-from-outer-scope消失的外部变量 |
| https://github.com/stringmumu/wtfpython-cn#-说明-20 |
| https://docs.python.org/3/reference/compound_stmts.html#except | https://docs.python.org/3/reference/compound_stmts.html#except |
| https://github.com/stringmumu/wtfpython-cn#-when-true-is-actually-false真亦假 |
| https://github.com/stringmumu/wtfpython-cn#-说明-21 |
| https://github.com/stringmumu/wtfpython-cn#-from-filled-to-none-in-one-instruction从有到无 |
| https://github.com/stringmumu/wtfpython-cn#-说明-22 |
| 这里 | http://docs.python.org/2/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list |
| https://github.com/stringmumu/wtfpython-cn#-subclass-relationships子类关系- |
| https://github.com/stringmumu/wtfpython-cn#-说明-23 |
| 这里 | https://www.naftaliharris.com/blog/python-subclass-intransitivity/ |
| https://github.com/stringmumu/wtfpython-cn#-the-mysterious-key-type-conversion神秘的键型转换- |
| https://github.com/stringmumu/wtfpython-cn#-说明-24 |
| https://github.com/stringmumu/wtfpython-cn#-lets-see-if-you-can-guess-this看看你能否猜到这一点 |
| https://github.com/stringmumu/wtfpython-cn#-说明-25 |
| Python 语言参考 | https://docs.python.org/2/reference/simple_stmts.html#assignment-statements |
| https://github.com/stringmumu/wtfpython-cn#section-appearances-are-deceptive外表是靠不住的 |
| https://github.com/stringmumu/wtfpython-cn#-skipping-lines跳过一行 |
| https://github.com/stringmumu/wtfpython-cn#-说明-26 |
| 代码点 | https://en.wikipedia.org/wiki/Code_point |
| https://github.com/stringmumu/wtfpython-cn#-teleportation空间移动- |
| https://github.com/stringmumu/wtfpython-cn#-说明-27 |
| https://github.com/stringmumu/wtfpython-cn#-well-something-is-fishy嗯有些可疑 |
| mixed_tabs_and_spaces.py | https://github.com/stringmumu/wtfpython-cn/blob/master/mixed_tabs_and_spaces.py |
| https://github.com/stringmumu/wtfpython-cn#-说明-28 |
| https://github.com/stringmumu/wtfpython-cn#section-watch-out-for-the-landmines小心地雷 |
| https://github.com/stringmumu/wtfpython-cn#-modifying-a-dictionary-while-iterating-over-it迭代字典时的修改 |
| https://github.com/stringmumu/wtfpython-cn#-说明-29 |
| 5 | https://github.com/python/cpython/blob/v3.6.1/Objects/dictobject.c#L103-L110 |
| 回答 | https://stackoverflow.com/questions/44763802/bug-in-python-dict |
| https://github.com/stringmumu/wtfpython-cn#-stubborn-del-operator坚强的-del- |
| https://github.com/stringmumu/wtfpython-cn#-说明-30 |
| 这里 | https://www.cnblogs.com/leisurelylicht/p/diao-pi-de-kong-zhi-tai.html |
| https://github.com/stringmumu/wtfpython-cn#-deleting-a-list-item-while-iterating迭代列表时删除元素 |
| https://github.com/stringmumu/wtfpython-cn#-说明-31 |
| 回答 | https://stackoverflow.com/questions/45946228/what-happens-when-you-try-to-delete-a-list-element-while-iterating-over-it |
| 回答 | https://stackoverflow.com/questions/45877614/how-to-change-all-the-dictionary-keys-in-a-for-loop-with-d-items |
| https://github.com/stringmumu/wtfpython-cn#-loop-variables-leaking-out循环变量泄漏 |
| https://github.com/stringmumu/wtfpython-cn#-说明-32 |
| What’s New In Python 3.0 | https://docs.python.org/3/whatsnew/3.0.html |
| https://github.com/stringmumu/wtfpython-cn#-beware-of-default-mutable-arguments当心默认的可变参数 |
| https://github.com/stringmumu/wtfpython-cn#-说明-33 |
| https://github.com/stringmumu/wtfpython-cn#-catching-the-exceptions捕获异常 |
| https://github.com/stringmumu/wtfpython-cn#-说明-34 |
| https://github.com/stringmumu/wtfpython-cn#-same-operands-different-story同人不同命 |
| https://github.com/stringmumu/wtfpython-cn#-说明-35 |
| https://github.com/stringmumu/wtfpython-cn#-the-out-of-scope-variable外部作用域变量 |
| https://github.com/stringmumu/wtfpython-cn#-说明-36 |
| 这个 | http://sebastianraschka.com/Articles/2014_python_scope_and_namespaces.html |
| https://github.com/stringmumu/wtfpython-cn#-be-careful-with-chained-operations小心链式操作 |
| https://github.com/stringmumu/wtfpython-cn#-说明-37 |
| https://docs.python.org/2/reference/expressions.html#not-in | https://docs.python.org/2/reference/expressions.html#not-in |
| https://github.com/stringmumu/wtfpython-cn#-name-resolution-ignoring-class-scope忽略类作用域的名称解析 |
| https://github.com/stringmumu/wtfpython-cn#-说明-38 |
| https://github.com/stringmumu/wtfpython-cn#-needle-in-a-haystack大海捞针 |
| https://github.com/stringmumu/wtfpython-cn#-说明-39 |
| https://github.com/stringmumu/wtfpython-cn#section-the-hidden-treasures隐藏的宝藏 |
| https://github.com/stringmumu/wtfpython-cn#-okay-python-can-you-make-me-flypython-可否带我飞- |
| https://github.com/stringmumu/wtfpython-cn#-说明-40 |
| 经典 XKCD 漫画 | http://xkcd.com/353/ |
| 代码 | https://github.com/python/cpython/blob/master/Lib/antigravity.py#L7-L17 |
| XKCD's geohashing 算法 | https://xkcd.com/426/ |
| https://github.com/stringmumu/wtfpython-cn#-goto-but-whygoto-但为什么- |
| https://github.com/stringmumu/wtfpython-cn#-说明-41 |
| 宣布 | https://mail.python.org/pipermail/python-announce-list/2004-April/002982.html |
| 原因 | https://docs.python.org/3/faq/design.html#why-is-there-no-goto |
| https://github.com/stringmumu/wtfpython-cn#-brace-yourself做好思想准备- |
| https://github.com/stringmumu/wtfpython-cn#-说明-42 |
| https://github.com/stringmumu/wtfpython-cn#-lets-meet-friendly-language-uncle-for-life让生活更友好- |
| https://github.com/stringmumu/wtfpython-cn#-说明-43 |
| PEP-401 | https://www.python.org/dev/peps/pep-0401/ |
| 这里 | https://www.python.org/dev/peps/pep-0401/ |
| https://github.com/stringmumu/wtfpython-cn#-even-python-understands-that-love-is-complicated连python也知道爱是难言的- |
| https://github.com/stringmumu/wtfpython-cn#-说明-44 |
| PEP 20 | https://www.python.org/dev/peps/pep-0020 |
| this.py | https://hg.python.org/cpython/file/c3896275c0f6/Lib/this.py |
| https://github.com/stringmumu/wtfpython-cn#-yes-it-exists是的-它存在 |
| https://github.com/stringmumu/wtfpython-cn#-说明-45 |
| https://github.com/stringmumu/wtfpython-cn#-inpinity无限- |
| Pi | https://en.wikipedia.org/wiki/Pi |
| https://github.com/stringmumu/wtfpython-cn#-说明-46 |
| https://github.com/stringmumu/wtfpython-cn#-mangling-time修饰时间- |
| Yo Yo Honey Singh | https://en.wikipedia.org/wiki/Yo_Yo_Honey_Singh |
| https://github.com/stringmumu/wtfpython-cn#-说明-47 |
| 名字修饰 | https://en.wikipedia.org/wiki/Name_mangling |
| https://github.com/stringmumu/wtfpython-cn#section-miscellaneous杂项 |
| https://github.com/stringmumu/wtfpython-cn#--is-faster更快的- |
| https://github.com/stringmumu/wtfpython-cn#-说明-48 |
| https://github.com/stringmumu/wtfpython-cn#-lets-make-a-giant-string来做个巨大的字符串吧 |
| https://github.com/stringmumu/wtfpython-cn#-说明-49 |
| timeit | https://docs.python.org/3/library/timeit.html |
| https://github.com/stringmumu/wtfpython-cn#-explicit-typecast-of-strings字符串的显式类型转换 |
| https://github.com/stringmumu/wtfpython-cn#-说明-50 |
| https://github.com/stringmumu/wtfpython-cn#-minor-ones小知识点 |
| 序列 | https://docs.python.org/3/glossary.html#term-sequence |
| 回答 | https://stackoverflow.com/questions/3654830/why-are-there-no-and-operators-in-python |
| 全局解释锁 | https://wiki.python.org/moin/GlobalInterpreterLock |
| multiprocessing | https://docs.python.org/2/library/multiprocessing.html |
| 有趣故事 | http://chris.improbable.org/2014/8/25/adventures-in-unicode-digits/ |
| https://github.com/stringmumu/wtfpython-cn#contributing贡献 |
| CONTRIBUTING.md | https://github.com/satwikkansal/wtfpython/blob/master/CONTRIBUTING.md |
| issue | https://github.com/satwikkansal/wtfpython/issues/new |
| Gitter | https://gitter.im/wtfpython/Lobby |
| 这里 | https://github.com/leisurelicht/wtfpython-cn/blob/master/CONTRIBUTING.md |
| https://github.com/stringmumu/wtfpython-cn#acknowledgements致谢 |
| wtfjs | https://github.com/denysdovhan/wtfjs |
| https://github.com/stringmumu/wtfpython-cn#some-nice-links一些不错的资源 |
| https://www.youtube.com/watch?v=sH4XF6pKKmk | https://www.youtube.com/watch?v=sH4XF6pKKmk |
| https://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_python | https://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_python |
| https://sopython.com/wiki/Common_Gotchas_In_Python | https://sopython.com/wiki/Common_Gotchas_In_Python |
| https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines | https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines |
| https://stackoverflow.com/questions/1011431/common-pitfalls-in-python | https://stackoverflow.com/questions/1011431/common-pitfalls-in-python |
| https://www.python.org/doc/humor/ | https://www.python.org/doc/humor/ |
| https://www.codementor.io/satwikkansal/python-practices-for-efficient-code-performance-memory-and-usability-aze6oiq65 | https://www.codementor.io/satwikkansal/python-practices-for-efficient-code-performance-memory-and-usability-aze6oiq65 |
| https://github.com/stringmumu/wtfpython-cn#-license许可 |
| http://www.wtfpl.net |
| Satwik Kansal | https://satwikkansal.xyz |
| https://github.com/stringmumu/wtfpython-cn#help帮助 |
| https://github.com/stringmumu/wtfpython-cn#surprise-your-geeky-pythonist-friends想给你的极客朋友一个惊喜 |
| Twitter | https://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython |
| Linkedin | https://www.linkedin.com/shareArticle?url=https://github.com/satwikkansal&title=What%20the%20f*ck%20Python!&summary=An%20interesting%20collection%20of%20subtle%20and%20tricky%20Python%20snippets. |
| https://github.com/stringmumu/wtfpython-cn#need-a-pdf-version需要来一份pdf版的 |
| 这 | https://satwikkansal.xyz/wtfpython-pdf/ |
| https://github.com/stringmumu/wtfpython-cn#follow-commit追踪commit |
| https://github.com/satwikkansal/wtfpython/commit/30e05a5973930c38cdb59f1c02b85b19b22ac531 |
| github.com/leisurelicht/wtfpython-cn/blob/master/CONTRIBUTING.md | https://github.com/leisurelicht/wtfpython-cn/blob/master/CONTRIBUTING.md |
|
Readme
| https://github.com/stringmumu/wtfpython-cn#readme-ov-file |
|
Contributing
| https://github.com/stringmumu/wtfpython-cn#contributing-ov-file |
| Please reload this page | https://github.com/stringmumu/wtfpython-cn |
|
Activity | https://github.com/stringmumu/wtfpython-cn/activity |
|
0
stars | https://github.com/stringmumu/wtfpython-cn/stargazers |
|
1
watching | https://github.com/stringmumu/wtfpython-cn/watchers |
|
0
forks | https://github.com/stringmumu/wtfpython-cn/forks |
|
Report repository
| https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fstringmumu%2Fwtfpython-cn&report=stringmumu+%28user%29 |
| Releases | https://github.com/stringmumu/wtfpython-cn/releases |
| Packages
0 | https://github.com/users/stringmumu/packages?repo_name=wtfpython-cn |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |