René's URL Explorer Experiment


Title: Implement `__doc__` to except signature · Issue #2907 · RustPython/RustPython · GitHub

Open Graph Title: Implement `__doc__` to except signature · Issue #2907 · RustPython/RustPython

X Title: Implement `__doc__` to except signature · Issue #2907 · RustPython/RustPython

Description: This is nice! It does introduce an issue though, __doc__ now contains that text signature in its contents, you'll need to tweak doc to ignore the signature at the start (similar to CPythons _PyType_DocWithoutSignature). Originally posted...

Open Graph Description: This is nice! It does introduce an issue though, __doc__ now contains that text signature in its contents, you'll need to tweak doc to ignore the signature at the start (similar to CPythons _PyType...

X Description: This is nice! It does introduce an issue though, __doc__ now contains that text signature in its contents, you'll need to tweak doc to ignore the signature at the start (similar to CPythons _Py...

Opengraph URL: https://github.com/RustPython/RustPython/issues/2907

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement `__doc__` to except signature","articleBody":"> This is nice! It does introduce an issue though, `__doc__` now contains that text signature in its contents, you'll need to tweak doc to ignore the signature at the start (similar to CPythons `_PyType_DocWithoutSignature`).\r\n>\r\n> _Originally posted by @DimitrisJim in https://github.com/RustPython/RustPython/issues/2904#issuecomment-900752179_\r\n\r\n# Overview\r\n\r\nDocumentations of methods, types in CPython can have format like below:\r\n\r\n```\r\n\u003cSIGNATURE>\r\n--\r\n\r\n\u003cDOCUMENT>\r\n```\r\n\r\nAnd CPython's `__doc__` property strips the signature through `_PyType_DocWithoutSignature`. Then, when you call `\u003c?>.__doc__`, you will see only `\u003cDOCUMENT>`. But RustPython hasn't implemented it so it should be implemented.\r\n\r\n# Example\r\n\r\nLet's see the case of `object` type.\r\n\r\nThe full doc is:\r\n\r\n```c\r\nPyDoc_STRVAR(object_doc,\r\n\"object()\\n--\\n\\n\"\r\n\"The base class of the class hierarchy.\\n\\n\"\r\n\"When called, it accepts no arguments and returns a new featureless\\n\"\r\n\"instance that has no instance attributes and cannot be given any.\\n\");\r\n```\r\n\r\nAs human-familiar:\r\n\r\n```\r\nobject()\r\n--\r\n\r\nThe base class of the class hierarchy.\r\n\r\nWhen called, it accepts no arguments and returns a new featureless\r\nInstance that has no instance attributes and cannot be given any.\r\n\r\n```\r\n\r\nAnd when call `print(object.__doc__)` in CPython 3.8.0, you will see:\r\n\r\n```\r\nThe base class of the class hierarchy.\r\n\r\nWhen called, it accepts no arguments and returns a new featureless\r\ninstance that has no instance attributes and cannot be given any.\r\n\r\n```\r\n\r\n# References\r\n\r\n- `_PyType_DocWithoutSignature` implementation: https://github.com/python/cpython/blob/fa919fdf2583bdfead1df00e842f24f30b2a34bf/Objects/typeobject.c#L158-L169","author":{"url":"https://github.com/moreal","@type":"Person","name":"moreal"},"datePublished":"2021-08-18T12:20:28Z","url":"https://github.com/RustPython/RustPython/issues/2907"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:919a9ff5-aed3-623f-31a3-d49ef9d39b0e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD240:3D97C8:3860035:4AEF360:6B0214B4
html-safe-noncef779f18d92a6c89ce7dbaff80589907a0ac84c1ef67e3e790da3c2c5b3270fbe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjQwOjNEOTdDODozODYwMDM1OjRBRUYzNjA6NkIwMjE0QjQiLCJ2aXNpdG9yX2lkIjoiNzUxNDk2MzQ4NTczMDY3Mzg0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccfde077f8d69ed17f58eb6b645748e71ab386d9f1cf5e242db0096208a700ed8
hovercard-subject-tagissue:973605632
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/2907/issue_layout
twitter:imagehttps://opengraph.githubassets.com/543f2e6aac36853c6c913dd9160fff9f7202f51d491c0e37aca386532781bc78/RustPython/RustPython/issues/2907
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/543f2e6aac36853c6c913dd9160fff9f7202f51d491c0e37aca386532781bc78/RustPython/RustPython/issues/2907
og:image:altThis is nice! It does introduce an issue though, __doc__ now contains that text signature in its contents, you'll need to tweak doc to ignore the signature at the start (similar to CPythons _PyType...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemoreal
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/RustPython/RustPython/issues/2907#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fissues%2F2907
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%2FRustPython%2FRustPython%2Fissues%2F2907
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/issues/2907
Reloadhttps://github.com/RustPython/RustPython/issues/2907
Reloadhttps://github.com/RustPython/RustPython/issues/2907
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests131 (131)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
https://github.com/RustPython/RustPython
New issuehttps://github.com/login?return_to=https://github.com/RustPython/RustPython/issues/2907
New issuehttps://github.com/login?return_to=https://github.com/RustPython/RustPython/issues/2907
Implement __doc__ to except signaturehttps://github.com/RustPython/RustPython/issues/2907#top
z-ca-2021Tag to track contrubution-academy 2021https://github.com/RustPython/RustPython/issues?q=state%3Aopen%20label%3A%22z-ca-2021%22
https://github.com/moreal
morealhttps://github.com/moreal
on Aug 18, 2021https://github.com/RustPython/RustPython/issues/2907#issue-973605632
@DimitrisJimhttps://github.com/DimitrisJim
#2904 (comment)https://github.com/RustPython/RustPython/pull/2904#issuecomment-900752179
https://github.com/python/cpython/blob/fa919fdf2583bdfead1df00e842f24f30b2a34bf/Objects/typeobject.c#L158-L169https://github.com/python/cpython/blob/fa919fdf2583bdfead1df00e842f24f30b2a34bf/Objects/typeobject.c#L158-L169
https://github.com/youknowone
youknowonehttps://github.com/youknowone
on Aug 18, 2021https://github.com/RustPython/RustPython/issues/2907#issuecomment-901228644
youknowonehttps://github.com/youknowone
z-ca-2021Tag to track contrubution-academy 2021https://github.com/RustPython/RustPython/issues?q=state%3Aopen%20label%3A%22z-ca-2021%22
on Oct 16, 2021https://github.com/RustPython/RustPython/issues/2907#event-5472927552
https://github.com/youknowone
youknowonehttps://github.com/youknowone
on Jul 6, 2022https://github.com/RustPython/RustPython/issues/2907#issuecomment-1176273849
youknowonehttps://github.com/youknowone
completedhttps://github.com/RustPython/RustPython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 6, 2022https://github.com/RustPython/RustPython/issues/2907#event-6943215326
Sign up for freehttps://github.com/signup?return_to=https://github.com/RustPython/RustPython/issues/2907
Sign in to commenthttps://github.com/login?return_to=https://github.com/RustPython/RustPython/issues/2907
z-ca-2021Tag to track contrubution-academy 2021https://github.com/RustPython/RustPython/issues?q=state%3Aopen%20label%3A%22z-ca-2021%22
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.