René's URL Explorer Experiment


Title: Use print() function in both Python 2 and Python 3 by cclauss · Pull Request #2234 · GoogleCloudPlatform/python-docs-samples · GitHub

Open Graph Title: Use print() function in both Python 2 and Python 3 by cclauss · Pull Request #2234 · GoogleCloudPlatform/python-docs-samples

X Title: Use print() function in both Python 2 and Python 3 by cclauss · Pull Request #2234 · GoogleCloudPlatform/python-docs-samples

Description: Code samples used on cloud.google.com. Contribute to GoogleCloudPlatform/python-docs-samples development by creating an account on GitHub.

Open Graph Description: Legacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3.

X Description: Legacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3.

Opengraph URL: https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:d9db33d2-7ed1-b271-06e6-d2dca5271fac
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC432:3F4811:ED3AB3:15B1A3E:6A4E32A2
html-safe-nonce750c6c514767240b331039a200bb3b3e0050ca3db34421613ae05fa445d16cf0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDMyOjNGNDgxMTpFRDNBQjM6MTVCMUEzRTo2QTRFMzJBMiIsInZpc2l0b3JfaWQiOiIzMjg5OTc2NTI3MTE5MDY5ODU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9383d6527ff02955815118357013d9d68063cf87900590c0fce67798843af306
hovercard-subject-tagpull_request:290484904
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/GoogleCloudPlatform/python-docs-samples/2234/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/f818d664a293a0c24c2d7bcc4b5a51c0c90fd84af3a89f3415055fe8107b85a9/GoogleCloudPlatform/python-docs-samples/pull/2234
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f818d664a293a0c24c2d7bcc4b5a51c0c90fd84af3a89f3415055fe8107b85a9/GoogleCloudPlatform/python-docs-samples/pull/2234
og:image:altLegacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecclauss
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-cache
go-importgithub.com/GoogleCloudPlatform/python-docs-samples git https://github.com/GoogleCloudPlatform/python-docs-samples.git
octolytics-dimension-user_id2810941
octolytics-dimension-user_loginGoogleCloudPlatform
octolytics-dimension-repository_id35065876
octolytics-dimension-repository_nwoGoogleCloudPlatform/python-docs-samples
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id35065876
octolytics-dimension-repository_network_root_nwoGoogleCloudPlatform/python-docs-samples
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
release42a6d378d7587a44c93aca255096cd66b7c8eb2d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fpython-docs-samples%2Fpull%2F2234
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://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%2FGoogleCloudPlatform%2Fpython-docs-samples%2Fpull%2F2234
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=GoogleCloudPlatform%2Fpython-docs-samples
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
GoogleCloudPlatform https://github.com/GoogleCloudPlatform
python-docs-sampleshttps://github.com/GoogleCloudPlatform/python-docs-samples
Notifications https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Fork 6.7k https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Star 8.1k https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Code https://github.com/GoogleCloudPlatform/python-docs-samples
Issues 55 https://github.com/GoogleCloudPlatform/python-docs-samples/issues
Pull requests 254 https://github.com/GoogleCloudPlatform/python-docs-samples/pulls
Actions https://github.com/GoogleCloudPlatform/python-docs-samples/actions
Wiki https://github.com/GoogleCloudPlatform/python-docs-samples/wiki
Security and quality 0 https://github.com/GoogleCloudPlatform/python-docs-samples/security
Insights https://github.com/GoogleCloudPlatform/python-docs-samples/pulse
Code https://github.com/GoogleCloudPlatform/python-docs-samples
Issues https://github.com/GoogleCloudPlatform/python-docs-samples/issues
Pull requests https://github.com/GoogleCloudPlatform/python-docs-samples/pulls
Actions https://github.com/GoogleCloudPlatform/python-docs-samples/actions
Wiki https://github.com/GoogleCloudPlatform/python-docs-samples/wiki
Security and quality https://github.com/GoogleCloudPlatform/python-docs-samples/security
Insights https://github.com/GoogleCloudPlatform/python-docs-samples/pulse
gguusshttps://github.com/gguuss
GoogleCloudPlatform:masterhttps://github.com/GoogleCloudPlatform/python-docs-samples/tree/master
cclauss:modernize-Python-2-codeshttps://github.com/cclauss/python-docs-samples/tree/modernize-Python-2-codes
Conversationhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
Commits5 (5)https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits
Checkshttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/checks
Files changedhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files
Use print() function in both Python 2 and Python 3https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#top
gguusshttps://github.com/gguuss
GoogleCloudPlatform:masterhttps://github.com/GoogleCloudPlatform/python-docs-samples/tree/master
cclauss:modernize-Python-2-codeshttps://github.com/cclauss/python-docs-samples/tree/modernize-Python-2-codes
https://github.com/cclauss
cclausshttps://github.com/cclauss
Jun 21, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#issue-459040262
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
https://github.com/cclauss
Use print() function in both Python 2 and Python 3https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/0054f9e7ef8243f39e9032f5b02e11a6b8a46514
0054f9ehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/0054f9e7ef8243f39e9032f5b02e11a6b8a46514
https://github.com/googlebot
googlebothttps://github.com/googlebot
cla: yes https://github.com/GoogleCloudPlatform/python-docs-samples/issues?q=state%3Aopen%20label%3A%22cla%3A%20yes%22
Jun 21, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#event-2429428370
cclausshttps://github.com/cclauss
June 21, 2019 16:12https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#commits-pushed-4eb367f
https://github.com/cclauss
'unicode' was removed in Python 3 because all str are Unicodehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/4eb367f4d72ae9b60677052330fbe90ddf92bc0d
4eb367fhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/4eb367f4d72ae9b60677052330fbe90ddf92bc0d
https://github.com/cclauss
try: basestring ; except NameError: basestring = strhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/eaa98119fd69f4ad1735ad3363cce70a700761bd
eaa9811https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/eaa98119fd69f4ad1735ad3363cce70a700761bd
https://github.com/gguuss
gguusshttps://github.com/gguuss
Jul 17, 2019 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#pullrequestreview-263341884
View reviewed changes https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/eaa98119fd69f4ad1735ad3363cce70a700761bd
gguusshttps://github.com/gguuss
https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#pullrequestreview-263341884
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
appengine/standard/i18n/i18n_utils.pyhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/eaa98119fd69f4ad1735ad3363cce70a700761bd#diff-4b7e1d2e5775c9402a8a09743a84ce47e77fa3838e734aef8c81ce744d01218e
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
appengine/standard/i18n/i18n_utils.pyhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/eaa98119fd69f4ad1735ad3363cce70a700761bd#diff-4b7e1d2e5775c9402a8a09743a84ce47e77fa3838e734aef8c81ce744d01218e
gguusshttps://github.com/gguuss
Jul 17, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#discussion_r304662255
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
cclausshttps://github.com/cclauss
Jul 18, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#discussion_r304722013
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
python/blackhttps://github.com/python/black
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
gguusshttps://github.com/gguuss
Jul 18, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#discussion_r304739485
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
gguusshttps://github.com/gguuss
Jul 18, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#discussion_r304748432
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
the style guidehttps://google.github.io/styleguide/pyguide.html
yapfhttps://github.com/google/yapf/
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
appengine/standard/mail/header.pyhttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/eaa98119fd69f4ad1735ad3363cce70a700761bd#diff-c68bd43cf412f6d1d7f9a56dca8bec1312b8a31cc28f784f09c25df586c32c7f
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
https://github.com/gguuss
gguusshttps://github.com/gguuss
Aug 19, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#issuecomment-522747020
@cclausshttps://github.com/cclauss
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
cclausshttps://github.com/cclauss
August 19, 2019 22:56https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#commits-pushed-d580cc3
https://github.com/cclauss
Format with ', not "https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/d580cc30030a3fd13cc4df75227902a3af2c4589
d580cc3https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/d580cc30030a3fd13cc4df75227902a3af2c4589
https://github.com/cclauss
Format with ', not "https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/63e054e4d0d06ded102a1598cbf9e0d30cc5625c
63e054ehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/commits/63e054e4d0d06ded102a1598cbf9e0d30cc5625c
https://github.com/gguuss
gguusshttps://github.com/gguuss
Aug 20, 2019 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#pullrequestreview-277351341
View reviewed changes https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/63e054e4d0d06ded102a1598cbf9e0d30cc5625c
gguusshttps://github.com/gguuss
https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#pullrequestreview-277351341
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
https://github.com/gguuss
gguusshttps://github.com/gguuss
02998e8https://github.com/GoogleCloudPlatform/python-docs-samples/commit/02998e872d83d86d4b886bb252aab514b55fbbc2
Aug 20, 2019https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#event-2570622621
https://github.com/cclauss
cclausshttps://github.com/cclauss
August 20, 2019 18:23https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234#event-2570641796
https://github.co/hiddenchars
https://github.com/GoogleCloudPlatform/python-docs-samples/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fpython-docs-samples%2Fpull%2F2234
https://github.com/gguuss
gguuss https://github.com/gguuss
https://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234/files/63e054e4d0d06ded102a1598cbf9e0d30cc5625c
cla: yes https://github.com/GoogleCloudPlatform/python-docs-samples/issues?q=state%3Aopen%20label%3A%22cla%3A%20yes%22
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/pull/2234
https://github.com/cclauss
https://github.com/gguuss
https://github.com/googlebot
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.