@@ -671,11 +671,11 @@ updated::
671
671
>>> print(sec1.parent)
672
672
<Doc 42 by D. N. Adams (1 sections)>
673
673
674
- It is also possible to directly connect a Section directly to a parent object.
674
+ It is also possible to connect a Section directly to a parent object.
675
675
Let's try this with the next Section we create::
676
676
677
- >>> sec2 = odml.Section(name="Arthur Philip Dent' ,
678
- definition="Information on Arthur Dent' ,
677
+ >>> sec2 = odml.Section(name="Arthur Philip Dent" ,
678
+ definition="Information on Arthur Dent" ,
679
679
type="crew/person",
680
680
parent=sec1)
681
681
@@ -704,7 +704,7 @@ Note that again, only the name attribute is obligatory for creating a Property.
704
704
The remaining attributes can be defined later on, or are automatically
705
705
generated in the process.
706
706
707
- If a value is defined, but the dtype not, as it is the case for our example
707
+ If a value is defined, but the dtype is not, as it is the case for our example
708
708
above, the dtype is deduced automatically::
709
709
710
710
>>> print(prop1.dtype)
@@ -732,7 +732,7 @@ the stored metadata:
732
732
+-----------------------------------+---------------------------------------+
733
733
| odml.DType.person or 'person' | 'Zaphod Beeblebrox' |
734
734
+-----------------------------------+---------------------------------------+
735
- | odml.DType.text or 'text' | |
735
+ | odml.DType.text or 'text' | 'any text containing \n linebreaks' |
736
736
+-----------------------------------+---------------------------------------+
737
737
| odml.DType.url or 'url' | "https://en.wikipedia.org/wiki/Earth" |
738
738
+-----------------------------------+---------------------------------------+
@@ -761,12 +761,12 @@ Next, let us create a Property with multiple metadata entries::
761
761
"Tricia Marie McMillan",
762
762
"Ford Prefect"],
763
763
dtype=odml.DType.person)
764
-
764
+
765
765
As you learned before, in such a case, the metadata entries must be
766
766
homogeneous! That means they have to be of the same dtype, unit, and
767
767
uncertainty (here ``odml.DType.person ``, None, and None, respectively).
768
768
769
- To further build up our odML file, let us attach now this new Porperty to the
769
+ To further build up our odML file, let us attach now this new Property to the
770
770
previously created Section 'TheCrew'::
771
771
772
772
>>> MYodML['TheCrew'].append(prop2)
@@ -792,7 +792,7 @@ hierarchical structure of the odML file looks like.
792
792
Let's have a look at the XML-representation of our small odML file we just
793
793
generated::
794
794
795
- >>> print unicode (odml.tools.xmlparser.XMLWriter(MYodML))
795
+ >>> print(odml.tools.xmlparser.XMLWriter(MYodML))
796
796
<odML version="1.1">
797
797
<date>1979-10-12</date>
798
798
<section>
0 commit comments