Skip to content

Commit 720fdc9

Browse files
committed
Document that app code should not pass 'dataset_id' to 'Key.__init__'.
Only the 'helpers.key_from_protobuf' factory should pass it. Fixes #293.
1 parent f7d0441 commit 720fdc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gcloud/datastore/key.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def __init__(self, path=None, namespace=None, dataset_id=None):
2424
2525
:type dataset_id: string
2626
:param dataset: The dataset ID assigned by back-end for the key.
27-
Leave as None for newly-created keys.
27+
Application code should leave this field None;
28+
expected to be set only by
29+
:func:`gcloud.datastore.helprs.key_from_protobuf`.
2830
"""
2931
self._path = path or [{'kind': ''}]
3032
self._namespace = namespace

0 commit comments

Comments
 (0)