Skip to content

Commit aedccd9

Browse files
committed
Update demos to clean up print statements.
1 parent 70c37e3 commit aedccd9

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

examples/basic/crud.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ async def do_run() -> None:
2121
print("Put key 1; value one")
2222
await namedMap.put(1, "one")
2323

24-
print("Value for key 1 is : " + str(await namedMap.get(1)))
24+
print("Value for key 1 is : ", await namedMap.get(1))
2525

26-
print("NamedMap size is : " + str(await namedMap.size()))
26+
print("NamedMap size is : ", await namedMap.size())
2727

28-
print("Updating value of key 1 to ONE from " + await namedMap.put(1, "ONE"))
28+
print("Updating value of key 1 to ONE from ", await namedMap.put(1, "ONE"))
2929

30-
print("Value for key 1 is : " + str(await namedMap.get(1)))
30+
print("Value for key 1 is : ", await namedMap.get(1))
3131

32-
print("Removing key 1, current value : " + await namedMap.remove(1))
32+
print("Removing key 1, current value : ", await namedMap.remove(1))
3333

34-
print("NamedMap size is : " + str(await namedMap.size()))
34+
print("NamedMap size is : ", await namedMap.size())
3535
finally:
3636
await session.close()
3737

examples/basic/python_object_keys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ async def do_run() -> None:
4141
print(f"Add new account {new_account} with key {new_account_key}")
4242
await namedMap.put(new_account_key, new_account)
4343

44-
print("NamedMap size is : " + str(await namedMap.size()))
44+
print("NamedMap size is : ", await namedMap.size())
4545

46-
print("Account from get() : " + str(await namedMap.get(new_account_key)))
46+
print("Account from get() : ", await namedMap.get(new_account_key))
4747

4848
print("Update account balance using processor ...")
4949
await namedMap.invoke(new_account_key, Processors.update("balance", new_account.balance + 1000))
5050

51-
print("Updated account is : " + str(await namedMap.get(new_account_key)))
51+
print("Updated account is : ", await namedMap.get(new_account_key))
5252

5353
await namedMap.remove(new_account_key)
5454

55-
print("NamedMap size is : " + str(await namedMap.size()))
55+
print("NamedMap size is : ", await namedMap.size())
5656
finally:
5757
await session.close()
5858

examples/basic/python_object_values.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ async def do_run() -> None:
3434
await namedMap.clear()
3535

3636
person: Person = Person(1, "Bilbo", 111)
37-
print("Add new person : " + str(person))
37+
print("Add new person : ", person)
3838
await namedMap.put(person.id, person)
3939

40-
print("NamedMap size is : " + str(await namedMap.size()))
40+
print("NamedMap size is : ", await namedMap.size())
4141

42-
print("Person from get() : " + str(await namedMap.get(person.id)))
42+
print("Person from get() : ", await namedMap.get(person.id))
4343

4444
print("Update person using processor ...")
4545
await namedMap.invoke(person.id, Processors.update("age", 112))
4646

47-
print("Updated person is : " + str(await namedMap.get(person.id)))
47+
print("Updated person is : ", await namedMap.get(person.id))
4848

4949
await namedMap.remove(person.id)
5050

51-
print("NamedMap size is : " + str(await namedMap.size()))
51+
print("NamedMap size is : ", await namedMap.size())
5252
finally:
5353
await session.close()
5454

0 commit comments

Comments
 (0)