Title: why is str() the same as repr()? · Issue #49 · python-hyper/hyperlink · GitHub
Open Graph Title: why is str() the same as repr()? · Issue #49 · python-hyper/hyperlink
X Title: why is str() the same as repr()? · Issue #49 · python-hyper/hyperlink
Description: >>> url = URL.from_text('https://example.org/api/v2') >>> str(url) "URL.from_text('https://example.org/api/v2')" >>> repr(url) "URL.from_text('https://example.org/api/v2')" why is str() not just the url? https://example.org/api/v2 the re...
Open Graph Description: >>> url = URL.from_text('https://example.org/api/v2') >>> str(url) "URL.from_text('https://example.org/api/v2')" >>> repr(url) "URL.from_text('https://example.org/api/v2')" why is str() not just th...
X Description: >>> url = URL.from_text('https://example.org/api/v2') >>> str(url) "URL.from_text('https://example.org/api/v2')" >>> repr(url) "URL.from_te...
Opengraph URL: https://github.com/python-hyper/hyperlink/issues/49
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"why is str() the same as repr()?","articleBody":"```\r\n>>> url = URL.from_text('https://example.org/api/v2')\r\n\r\n>>> str(url)\r\n\"URL.from_text('https://example.org/api/v2')\"\r\n\r\n>>> repr(url)\r\n\"URL.from_text('https://example.org/api/v2')\"\r\n```\r\n\r\nwhy is `str()` not just the url?\r\n\r\n```\r\nhttps://example.org/api/v2\r\n```\r\n\r\nthe `requests` library \"stringifies\" urls (by design). in practice that means that for instance [furl](https://github.com/gruns/furl/) instances can be passed directly. this is not possible with `hyperlink`:\r\n\r\n``` python\r\n>>> from hyperlink import URL\r\n>>> import requests\r\n\r\n>>> url = URL.from_text('https://example.org/api/v2')\r\n>>> requests.get(url)\r\n[...]\r\nInvalidSchema: No connection adapters were found for 'URL.from_text('https://example.org/api/v2')'\r\n```","author":{"url":"https://github.com/wbolster","@type":"Person","name":"wbolster"},"datePublished":"2017-11-16T12:28:16Z","url":"https://github.com/python-hyper/hyperlink/issues/49"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b16012e-b289-ee3a-c36d-85442bacffaf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C36A:1A09C8:34985A4:46791C6:6B06EB99 |
| html-safe-nonce | b557ac4fd4035fb9c1a1f8ce57af97a257ab9407e3d99c2ffaf22658e7d22e1f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzZBOjFBMDlDODozNDk4NUE0OjQ2NzkxQzY6NkIwNkVCOTkiLCJ2aXNpdG9yX2lkIjoiNzE3NjYxNTU4NzE3MzgyMTMzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 32e1b186c40595568b138022cea26f89f781676500f8b4e91760b84d2bf07152 |
| hovercard-subject-tag | issue:274498704 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python-hyper/hyperlink/49/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54cfd114d69a0f4c9107de29a86dafb54955ab1259f253c39a537977a30c0125/python-hyper/hyperlink/issues/49 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54cfd114d69a0f4c9107de29a86dafb54955ab1259f253c39a537977a30c0125/python-hyper/hyperlink/issues/49 |
| og:image:alt | >>> url = URL.from_text('https://example.org/api/v2') >>> str(url) "URL.from_text('https://example.org/api/v2')" >>> repr(url) "URL.from_text('https://example.org/api/v2')" why is str() not just th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wbolster |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/hyperlink git https://github.com/python-hyper/hyperlink.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 82321340 |
| octolytics-dimension-repository_nwo | python-hyper/hyperlink |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82321340 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/hyperlink |
| 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 | af8913cd0f2f77c41796be449ac66a9108825abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width