Title: Clean up methods which return self · Issue #776 · googleapis/google-cloud-python · GitHub
Open Graph Title: Clean up methods which return self · Issue #776 · googleapis/google-cloud-python
X Title: Clean up methods which return self · Issue #776 · googleapis/google-cloud-python
Description: See https://github.com/GoogleCloudPlatform/gcloud-python/pull/770/files#r27422508 return self is a JavaScript-y method chaining construct. In Python foo = Foo() foo2 = foo.update() indicates that foo2 is indeed a Foo object, but that foo...
Open Graph Description: See https://github.com/GoogleCloudPlatform/gcloud-python/pull/770/files#r27422508 return self is a JavaScript-y method chaining construct. In Python foo = Foo() foo2 = foo.update() indicates that f...
X Description: See https://github.com/GoogleCloudPlatform/gcloud-python/pull/770/files#r27422508 return self is a JavaScript-y method chaining construct. In Python foo = Foo() foo2 = foo.update() indicates that f...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/776
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clean up methods which return self","articleBody":"See https://github.com/GoogleCloudPlatform/gcloud-python/pull/770/files#r27422508\n\n`return self` is a JavaScript-y method chaining construct.\n\nIn Python\n\n``` python\nfoo = Foo()\nfoo2 = foo.update()\n```\n\nindicates that `foo2` is indeed a `Foo` object, but that `foo.update()` has applied the changes without mutating `foo`. Using `return self` breaks that expectation.\n\nFor example on `list`\n\n``` python\n\u003e\u003e\u003e a = [3, -4, 1, 0]\n\u003e\u003e\u003e b = a.sort()\n\u003e\u003e\u003e b is None\nTrue\n\u003e\u003e\u003e a\n[-4, 0, 1, 3]\n```\n","author":{"url":"https://github.com/dhermes","@type":"Person","name":"dhermes"},"datePublished":"2015-03-30T19:24:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/776/google-cloud-python/issues/776"}
| 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:fa7f7f26-fe6b-0669-b412-a73dfddae08f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D570:C0E86:3720E:49CEF:6A4D2D2C |
| html-safe-nonce | 1747a9d304f59bc9687c742a2a1c36f80d2f9120fb0a815d72117cc3c17ee8db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTcwOkMwRTg2OjM3MjBFOjQ5Q0VGOjZBNEQyRDJDIiwidmlzaXRvcl9pZCI6IjQ3ODUxMzQ5NjYyMDYwODgxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b7066b6ad769f8cb337cdc3bd7d675bb923930ea293cbe5ea0c4522fe4b6735 |
| hovercard-subject-tag | issue:65282569 |
| 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/googleapis/google-cloud-python/776/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82df3e68c404ecdd5bba5d0f6b7da77e25c6a2924ea16467c5494952f70f3a38/googleapis/google-cloud-python/issues/776 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82df3e68c404ecdd5bba5d0f6b7da77e25c6a2924ea16467c5494952f70f3a38/googleapis/google-cloud-python/issues/776 |
| og:image:alt | See https://github.com/GoogleCloudPlatform/gcloud-python/pull/770/files#r27422508 return self is a JavaScript-y method chaining construct. In Python foo = Foo() foo2 = foo.update() indicates that f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dhermes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| 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 | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width