Title: Support __getattr__ · Issue #520 · python/mypy · GitHub
Open Graph Title: Support __getattr__ · Issue #520 · python/mypy
X Title: Support __getattr__ · Issue #520 · python/mypy
Description: Support overloading attribute access by defining a __getattr__ method. If a class has a __getattr__ method, mypy should let programs access any attributes, and the type would be the return type of __getattr__. Example: class A: def __get...
Open Graph Description: Support overloading attribute access by defining a __getattr__ method. If a class has a __getattr__ method, mypy should let programs access any attributes, and the type would be the return type of ...
X Description: Support overloading attribute access by defining a __getattr__ method. If a class has a __getattr__ method, mypy should let programs access any attributes, and the type would be the return type of ...
Opengraph URL: https://github.com/python/mypy/issues/520
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support __getattr__","articleBody":"Support overloading attribute access by defining a `__getattr__` method. If a class has a `__getattr__` method, mypy should let programs access any attributes, and the type would be the return type of `__getattr__`. Example:\n\n``` python\nclass A:\n def __getattr__(self, name: str) -> int: return 2\na = A()\nprint(a.foobar) # okay, type is int\n```\n","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2014-12-08T00:44:48Z","url":"https://github.com/python/mypy/issues/520"}
| 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:2e46ed9b-0d9c-821c-f095-105ddb3d625f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82B2:1A7566:2F62E:4058F:6B001A0C |
| html-safe-nonce | 28613cc812db9216713801c4dad174c18f9e6a23178bfd0662b180dd3ef7fbfa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkIyOjFBNzU2NjoyRjYyRTo0MDU4Rjo2QjAwMUEwQyIsInZpc2l0b3JfaWQiOiI4NTYwNjYwMTkxMTk0OTEzMjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4b731424bfd3fca1c4bad9ebb4b77d1463f4b95090d54e8674497d3eb2f374e6 |
| hovercard-subject-tag | issue:51238887 |
| 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/mypy/520/issue_layout |
| twitter:image | https://opengraph.githubassets.com/926188756f77437fcd2b3217bda1a7e77f9abeb396b537a383769c49085dd42e/python/mypy/issues/520 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/926188756f77437fcd2b3217bda1a7e77f9abeb396b537a383769c49085dd42e/python/mypy/issues/520 |
| og:image:alt | Support overloading attribute access by defining a __getattr__ method. If a class has a __getattr__ method, mypy should let programs access any attributes, and the type would be the return type of ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JukkaL |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width