René's URL Explorer Experiment


Title: Fix UserDict doctest for Python 3.12 and later by carlitogwapito · Pull Request #74 · fluentpython/example-code-2e · GitHub

Open Graph Title: Fix UserDict doctest for Python 3.12 and later by carlitogwapito · Pull Request #74 · fluentpython/example-code-2e

X Title: Fix UserDict doctest for Python 3.12 and later by carlitogwapito · Pull Request #74 · fluentpython/example-code-2e

Description: Fixes #73. UserDict.get() changed in Python 3.12, so the example's expected result now depends on the Python version. This adds a short explanation and checks the matching result in the doctest. All imports, classes and methods outside the module docstring are unchanged. Checked the module's 22 doctest examples with the standard-library doctest runner on Python 3.12.0 and 3.14.4: all pass. The original example has one failure out of 20 on 3.14.4, at ud.get('a', ''). Python 3.11 wasn't run locally. Its older behavior was checked against the CPython 3.11 implementation and Mapping.get, alongside the 3.12 implementation. This doesn't change the separate missing-key recursion behavior. Thanks for flagging the version difference.

Open Graph Description: Fixes #73. UserDict.get() changed in Python 3.12, so the example's expected result now depends on the Python version. This adds a short explanation and checks the matching result in the doctest...

X Description: Fixes #73. UserDict.get() changed in Python 3.12, so the example's expected result now depends on the Python version. This adds a short explanation and checks the matching result in the doc...

Opengraph URL: https://github.com/fluentpython/example-code-2e/pull/74

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:13027e88-7257-15f8-2ed7-ec63b28b9e8b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9A70:1D768B:1A5DF37:22D3388:6B067DEA
html-safe-nonceeeebe22e5bd7a5bf8e54ac861cbad04f3ea382e90727dde65afcd6d89656ab58
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTcwOjFENzY4QjoxQTVERjM3OjIyRDMzODg6NkIwNjdERUEiLCJ2aXNpdG9yX2lkIjoiMzQ2ODgyNTUyODA0NjYxNjA0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7f907487376959e855682766528a5089eb21755e67cd4fd07643b531423b0f5e
hovercard-subject-tagpull_request:4905045374
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/fluentpython/example-code-2e/pull/74/files
twitter:imagehttps://avatars.githubusercontent.com/u/20962552?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/20962552?s=400&v=4
og:image:altFixes #73. UserDict.get() changed in Python 3.12, so the example's expected result now depends on the Python version. This adds a short explanation and checks the matching result in the doctest...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/fluentpython/example-code-2e git https://github.com/fluentpython/example-code-2e.git
octolytics-dimension-user_id9216311
octolytics-dimension-user_loginfluentpython
octolytics-dimension-repository_id176997413
octolytics-dimension-repository_nwofluentpython/example-code-2e
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id176997413
octolytics-dimension-repository_network_root_nwofluentpython/example-code-2e
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6d3909414814ff86ce7da4c51a0f4918a13fb41b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/fluentpython/example-code-2e/pull/74/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffluentpython%2Fexample-code-2e%2Fpull%2F74%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffluentpython%2Fexample-code-2e%2Fpull%2F74%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=fluentpython%2Fexample-code-2e
Reloadhttps://github.com/fluentpython/example-code-2e/pull/74/files
Reloadhttps://github.com/fluentpython/example-code-2e/pull/74/files
Reloadhttps://github.com/fluentpython/example-code-2e/pull/74/files
fluentpythonhttps://github.com/fluentpython
example-code-2ehttps://github.com/fluentpython/example-code-2e
Codehttps://github.com/fluentpython/example-code-2e
Issues16 (16)https://github.com/fluentpython/example-code-2e/issues
Pull requests12 (12)https://github.com/fluentpython/example-code-2e/pulls
Actionshttps://github.com/fluentpython/example-code-2e/actions
Projectshttps://github.com/fluentpython/example-code-2e/projects
Security and qualityhttps://github.com/fluentpython/example-code-2e/security
Insightshttps://github.com/fluentpython/example-code-2e/insights
Sign up for GitHub https://github.com/signup?return_to=%2Ffluentpython%2Fexample-code-2e%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ffluentpython%2Fexample-code-2e%2Fissues%2Fnew%2Fchoose
carlitogwapitohttps://github.com/carlitogwapito
fluentpython:masterhttps://github.com/fluentpython/example-code-2e/tree/master
carlitogwapito:codex/docs-userdict-get-versionhttps://github.com/carlitogwapito/example-code-2e/tree/codex/docs-userdict-get-version
Conversation 0 https://github.com/fluentpython/example-code-2e/pull/74
Commits 1 https://github.com/fluentpython/example-code-2e/pull/74/commits
Checks 0 https://github.com/fluentpython/example-code-2e/pull/74/checks
Files changed https://github.com/fluentpython/example-code-2e/pull/74/files
Please reload this pagehttps://github.com/fluentpython/example-code-2e/pull/74/files
Fix UserDict doctest for Python 3.12 and later https://github.com/fluentpython/example-code-2e/pull/74/files#top
Show all changes 1 commit https://github.com/fluentpython/example-code-2e/pull/74/files
3675080 docs: account for UserDict.get changes in Python 3.12 carlitogwapito Oct 18, 2026 https://github.com/fluentpython/example-code-2e/pull/74/commits/3675080c3f360cf6510a86b45a05c2e344a374cb
Clear filters https://github.com/fluentpython/example-code-2e/pull/74/files
Please reload this pagehttps://github.com/fluentpython/example-code-2e/pull/74/files
Please reload this pagehttps://github.com/fluentpython/example-code-2e/pull/74/files
03-dict-set/missing.pyhttps://github.com/fluentpython/example-code-2e/pull/74/files#diff-f3335a745d94275a35e6a0c4d0c75c4b2ed53ef47400861cf8cab2dafa57e5f5
View file https://github.com/fluentpython/example-code-2e/blob/3675080c3f360cf6510a86b45a05c2e344a374cb/03-dict-set/missing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/fluentpython/example-code-2e/pull/74/{{ revealButtonHref }}
https://github.com/fluentpython/example-code-2e/pull/74/files#diff-f3335a745d94275a35e6a0c4d0c75c4b2ed53ef47400861cf8cab2dafa57e5f5
https://github.com/fluentpython/example-code-2e/pull/74/files#diff-f3335a745d94275a35e6a0c4d0c75c4b2ed53ef47400861cf8cab2dafa57e5f5
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.