Skip to content

Docs datastore short snippet still has set_defaults and brackets #702

Description

@jgeewax

See http://googlecloudplatform.github.io/gcloud-python/latest/index.html#cloud-datastore

Snippet is

fromgcloudimportdatastoredatastore.set_defaults()
entity=datastore.Entity(key=datastore.Key('Person'))
entity['name'] ='Your name'entity['age'] =25datastore.put([entity])

I'd expect it to be

fromgcloudimportdatastoreentity=datastore.Entity(key=datastore.Key('Person'))
entity['name'] ='Your name'entity['age'] =25datastore.put(entity) # Note no brackets

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions