Title: Distinguish between attributes of a class and attributes of its instances · Issue #1097 · python/mypy · GitHub
Open Graph Title: Distinguish between attributes of a class and attributes of its instances · Issue #1097 · python/mypy
X Title: Distinguish between attributes of a class and attributes of its instances · Issue #1097 · python/mypy
Description: The following typechecks: class A(object): def __init__(self): # type: () -> None self.X = 0 # type: int x = A.X even though X is not an attribute of the class A, just an attribute of its instances, and the x = A.X line causes an Attribu...
Open Graph Description: The following typechecks: class A(object): def __init__(self): # type: () -> None self.X = 0 # type: int x = A.X even though X is not an attribute of the class A, just an attribute of its instances...
X Description: The following typechecks: class A(object): def __init__(self): # type: () -> None self.X = 0 # type: int x = A.X even though X is not an attribute of the class A, just an attribute of its instan...
Opengraph URL: https://github.com/python/mypy/issues/1097
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Distinguish between attributes of a class and attributes of its instances","articleBody":"The following typechecks:\n\n```\nclass A(object):\n def __init__(self):\n # type: () -> None\n self.X = 0 # type: int\n\nx = A.X\n```\n\neven though `X` is not an attribute of the class `A`, just an attribute of its instances, and the `x = A.X` line causes an `AttributeError` when executed.\n","author":{"url":"https://github.com/mrwright","@type":"Person","name":"mrwright"},"datePublished":"2015-12-24T01:17:02Z","url":"https://github.com/python/mypy/issues/1097"}
| 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:db51aea8-d6ba-a78c-cf78-3e75389b2c3f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2E8:3D53C:205905:2D01AD:6B0067BC |
| html-safe-nonce | b4f0e26cfc0bb608f30ec649a0418f387c714fc2e29bcbf0031386258e75ef8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkU4OjNENTNDOjIwNTkwNToyRDAxQUQ6NkIwMDY3QkMiLCJ2aXNpdG9yX2lkIjoiNTEwODg0NDQ5MjA3NzY4ODc2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cbcf890d1b628794bf8a59d5ec8bff40aea448aff3801962adcb9c00cc68d47a |
| hovercard-subject-tag | issue:123743042 |
| 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/1097/issue_layout |
| twitter:image | https://opengraph.githubassets.com/423438ed4f2ef821f28ad98e48fa2006131a40eb31d621a3fbb3567d9acebcc0/python/mypy/issues/1097 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/423438ed4f2ef821f28ad98e48fa2006131a40eb31d621a3fbb3567d9acebcc0/python/mypy/issues/1097 |
| og:image:alt | The following typechecks: class A(object): def __init__(self): # type: () -> None self.X = 0 # type: int x = A.X even though X is not an attribute of the class A, just an attribute of its instances... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mrwright |
| hostname | github.com |
| expected-hostname | github.com |
| None | 25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e |
| 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 | e4f5c239e31f1f680e6bbc419ff92d774da616ec |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width