From dd4deaf85b82477dcea1e9b811a3bf9a79c0fac2 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Sat, 25 May 2024 15:39:41 +0200 Subject: [PATCH] Fixed misspelling (#832) --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6cd4d95aa..ff8356eb1 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,10 @@ True We can create an instance of `Person` with ```python -homes = Person( +holmes = Person( dimensions={"nskills": 4}, properties={ - "name": "Sherlock Homes", + "name": "Sherlock Holmes", "skills": ["observing", "chemistry", "violin", "boxing"], } ) @@ -123,25 +123,25 @@ By specifying it, we initialise the properties to the provided values In this case we didn't initialised the age ```python ->>> homes.age +>>> holmes.age 0.0 ->>> homes.age = 34 # Assign the age +>>> holmes.age = 34 # Assign the age ``` If you have [Pint] installed, you can also specify or access the age as a quantity with unit ```python ->>> homes.q.age = "34year" ->>> homes.q.age +>>> holmes.q.age = "34year" +>>> holmes.q.age ->>> homes.q.age.to("century").m +>>> holmes.q.age.to("century").m 0.34 ``` We can view (a JSON representation of) the instance with ```python ->>> print(homes) +>>> print(holmes) { "uuid": "314ac1ad-4a7e-477b-a56c-939121355112", "meta": "http://onto-ns.com/meta/0.1/Person", @@ -165,7 +165,7 @@ We can view (a JSON representation of) the instance with The instance can also be stored using the `save()` method ```python -homes.save("yaml", "homes.yaml", "mode=w") +holmes.save("yaml", "holmes.yaml", "mode=w") ``` which will produce the a YAML file with the following content