Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch documentation snippet has an extraneous line? and broken call? #710

Closed
jgeewax opened this issue Mar 12, 2015 · 1 comment · Fixed by #715
Closed

Batch documentation snippet has an extraneous line? and broken call? #710

jgeewax opened this issue Mar 12, 2015 · 1 comment · Fixed by #715
Assignees
Labels
api: datastore Issues related to the Datastore API.

Comments

@jgeewax
Copy link
Contributor

jgeewax commented Mar 12, 2015

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('dataset-id')
>>> with Batch() as batch:
...   do_some_work(batch)
...   raise Exception() # rolls back

I'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....

>>> from gcloud import datastore
>>> with datastore.Batch() as batch:  # Note datastore.Batch vs Batch?
...   do_some_work(batch)
...   raise Exception() # rolls back
@jgeewax jgeewax added api: datastore Issues related to the Datastore API. docs labels Mar 12, 2015
@jgeewax jgeewax added this to the Datastore Stable milestone Mar 12, 2015
@dhermes
Copy link
Contributor

dhermes commented Mar 12, 2015

I didn't realize you had filed this. #715 fixes this too.

parthea pushed a commit that referenced this issue Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440107808

Source-Link: googleapis/googleapis@258ddb2

Source-Link: googleapis/googleapis-gen@df0d09a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGYwZDA5YTJjMzZmZjViYWY5ODY0OGVlZmU1MDI5YzE3MzkwNWQwYiJ9

feat: update compute API to revision 20220322 (#710)
Source-Link: googleapis/googleapis@68ad73b

Source-Link: googleapis/googleapis-gen@a581672
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTU4MTY3MjA2MWI5NDgxYzAxOTJkZTAzYmJmYTM0NjRlMDIzMzgxMSJ9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants