René's URL Explorer Experiment


Title: What are `typing.IO`, `TextIO`, and `BinaryIO` good for? · python/typing · Discussion #829 · GitHub

Open Graph Title: What are `typing.IO`, `TextIO`, and `BinaryIO` good for? · python/typing · Discussion #829

X Title: What are `typing.IO`, `TextIO`, and `BinaryIO` good for? · python/typing · Discussion #829

Description: What are `typing.IO`, `TextIO`, and `BinaryIO` good for?

Open Graph Description: When should I use typing.IO, typing.TextIO, and typing.BinaryIO? Should I use Protocols instead? What is the difference between IO[str] and TextIO? I'm starting this topic to get the ball rolling o...

X Description: When should I use typing.IO, typing.TextIO, and typing.BinaryIO? Should I use Protocols instead? What is the difference between IO[str] and TextIO? I'm starting this topic to get the ball rolli...

Opengraph URL: https://github.com/python/typing/discussions/829

X: @github

direct link

Domain: github.com

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/discussions/:number(.:format)
route-controllerdiscussions
route-actionshow
fetch-noncev2:d91b78b0-63db-0a18-2a97-de7112d421fa
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-idA7BE:1DD784:51E4CC:6DD978:6B003030
html-safe-noncea4ab52589bf86c4dd424bcee0604868b5d3d2ec181197af49051cf168159c0c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0JFOjFERDc4NDo1MUU0Q0M6NkREOTc4OjZCMDAzMDMwIiwidmlzaXRvcl9pZCI6IjUzNTc4MTQ3ODY5MjUwMTUwODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac91816a1e44ff2b9ab206d3575cbf46685c712cec052467f8c35f19f5d961efde
hovercard-subject-tagdiscussion:3509907
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///discussions/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/typing/discussions/829
twitter:imagehttps://opengraph.githubassets.com/0f22ce5e2090f94a8851b28694a95759ebb1e7db8ec2f727e4a26d34cc0d6027/python/typing/discussions/829
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0f22ce5e2090f94a8851b28694a95759ebb1e7db8ec2f727e4a26d34cc0d6027/python/typing/discussions/829
og:image:altWhen should I use typing.IO, typing.TextIO, and typing.BinaryIO? Should I use Protocols instead? What is the difference between IO[str] and TextIO? I'm starting this topic to get the ball rolling o...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing/discussions/829#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fdiscussions%2F829
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%2Fpython%2Ftyping%2Fdiscussions%2F829
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fdiscussions%2Fshow&source=header-repo&source_repo=python%2Ftyping
Reloadhttps://github.com/python/typing/discussions/829
Reloadhttps://github.com/python/typing/discussions/829
Reloadhttps://github.com/python/typing/discussions/829
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
JelleZijlstra https://github.com/JelleZijlstra
Q&Ahttps://github.com/python/typing/discussions/categories/q-a
What are `typing.IO`, `TextIO`, and `BinaryIO` good for? https://github.com/python/typing/discussions/829#top
JelleZijlstra https://github.com/JelleZijlstra
Return to tophttps://github.com/python/typing/discussions/829#top
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
JelleZijlstra https://github.com/JelleZijlstra
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussion-3509907
Oldest https://github.com/python/typing/discussions/829?sort=old
Newest https://github.com/python/typing/discussions/829?sort=new
Top https://github.com/python/typing/discussions/829?sort=top
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
srittau https://github.com/srittau
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussioncomment-1150436
typeshed's open() annotationshttps://github.com/python/typeshed/blob/978659643db1bf4abf398ea776fcbfde9fae2c9b/stdlib/builtins.pyi#L1142
file-likehttps://docs.python.org/3/glossary.html#term-file-object
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
JelleZijlstra https://github.com/JelleZijlstra
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussioncomment-1150451
"file object"https://docs.python.org/3/glossary.html#term-file-object
https://github.com/python/typeshed/blob/master/stdlib/typing.pyi#L483https://github.com/python/typeshed/blob/master/stdlib/typing.pyi#L483
typeshedhttps://github.com/python/typeshed/
_typeshedhttps://github.com/python/typeshed/blob/master/stdlib/_typeshed/__init__.pyi#L144
builtins.openhttps://github.com/python/typeshed/blob/master/stdlib/builtins.pyi#L1144
https://github.com/srittau
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
srittauhttps://github.com/srittau
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussioncomment-1150508
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
gvanrossum https://github.com/gvanrossum
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussioncomment-1150579
https://github.com/srittau
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
srittauhttps://github.com/srittau
Aug 9, 2021 https://github.com/python/typing/discussions/829#discussioncomment-1150614
Please reload this pagehttps://github.com/python/typing/discussions/829
https://github.com/python/typing/discussions/829
MarDiehl https://github.com/MarDiehl
Aug 21, 2026 https://github.com/python/typing/discussions/829#discussioncomment-18110532
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fdiscussions%2F829
🙏 Q&A https://github.com/python/typing/discussions/categories/q-a
https://github.com/JelleZijlstra
https://github.com/srittau
https://github.com/gvanrossum
https://github.com/MarDiehl
https://github.com/python/typing/discussions/829
https://github.com/settings/replies?return_to=1
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

Viewport: width=device-width


URLs of crawlers that visited me.