Skip to content

Docs datastore short snippet still has set_defaults and brackets #702

@jgeewax

Description

@jgeewax

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

Snippet is

from gcloud import datastore
datastore.set_defaults()

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

I'd expect it to be

from gcloud import datastore

entity = datastore.Entity(key=datastore.Key('Person'))
entity['name'] = 'Your name'
entity['age'] = 25
datastore.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