Skip to content

Commit 5b0db7a

Browse files
authored
Add example showing explicit unicode for text values in entities. (#5263)
Closes #5262.
1 parent d49fcaa commit 5b0db7a

File tree

1 file changed

+1
-0
lines changed
  • packages/google-cloud-datastore/google/cloud/datastore

1 file changed

+1
-0
lines changed

packages/google-cloud-datastore/google/cloud/datastore/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
>>> key
2626
<Key('EntityKind', 1234), project=...>
2727
>>> entity = datastore.Entity(key)
28+
>>> entity['question'] = u'Life, universe?' # Explicit unicode for text
2829
>>> entity['answer'] = 42
2930
>>> entity
3031
<Entity('EntityKind', 1234) {'answer': 42}>

0 commit comments

Comments
 (0)