Title: Batch documentation snippet has an extraneous line? and broken call? · Issue #710 · googleapis/google-cloud-python · GitHub
Open Graph Title: Batch documentation snippet has an extraneous line? and broken call? · Issue #710 · googleapis/google-cloud-python
X Title: Batch documentation snippet has an extraneous line? and broken call? · Issue #710 · googleapis/google-cloud-python
Description: Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch The last example for this method has a snippet: >>> from gcloud import datastore >>> dataset = datastore.get_dataset...
Open Graph Description: Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch The last example for this method has a snippet: >>> from gcloud import datas...
X Description: Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch The last example for this method has a snippet: >>> from gcloud imp...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/710
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Batch documentation snippet has an extraneous line? and broken call?","articleBody":"Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch\n\nThe last example for this method has a snippet:\n\n``` python\n\u003e\u003e\u003e from gcloud import datastore\n\u003e\u003e\u003e dataset = datastore.get_dataset('dataset-id')\n\u003e\u003e\u003e with Batch() as batch:\n... do_some_work(batch)\n... raise Exception() # rolls back\n```\n\nI'm not sure why we need to have a dataset variable. I also don't know if that code even works... Might be worth chopping out? Ie, it would look like....\n\n``` python\n\u003e\u003e\u003e from gcloud import datastore\n\u003e\u003e\u003e with datastore.Batch() as batch: # Note datastore.Batch vs Batch?\n... do_some_work(batch)\n... raise Exception() # rolls back\n```\n","author":{"url":"https://github.com/jgeewax","@type":"Person","name":"jgeewax"},"datePublished":"2015-03-12T11:17:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/710/google-cloud-python/issues/710"}
| 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:0297d2bf-99fd-2e10-a401-3882617a174e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E562:BDC69:3BBAD:4DE3F:6A4D2D41 |
| html-safe-nonce | 36303643c5b8e1c2189b2ec38219ab570ee6b784c1c715b07481f9eb87179064 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTYyOkJEQzY5OjNCQkFEOjRERTNGOjZBNEQyRDQxIiwidmlzaXRvcl9pZCI6Ijc1MTY1NDczMTUwMzg3NjAyNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f40e9629c6b4de7804d8198abc5cc00172231b205af275a6053e6b69da22116 |
| hovercard-subject-tag | issue:60803717 |
| 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/710/issue_layout |
| twitter:image | https://opengraph.githubassets.com/49fbac90eddf8044434b70a33f25beebd3d1292f736c651e779df821217be456/googleapis/google-cloud-python/issues/710 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/49fbac90eddf8044434b70a33f25beebd3d1292f736c651e779df821217be456/googleapis/google-cloud-python/issues/710 |
| og:image:alt | Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch The last example for this method has a snippet: >>> from gcloud import datas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jgeewax |
| 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