@@ -588,9 +588,9 @@ some of the commands you learned before::
588
588
>>> <Doc None by None (0 sections)>
589
589
590
590
As you can see, we created an "empty" Document where the version and the author
591
- attributes are not defined and no section is yet attached. How to create and
592
- add a Section to a Document you will learn in the next chapter. Let's focus
593
- here on defining the Document attributes::
591
+ attributes are not defined and no section is yet attached. You will learn how to create
592
+ and add a Section to a Document in the next chapter. Let's focus here on defining
593
+ the Document attributes::
594
594
595
595
>>> MYodML.author = 'D. N. Adams'
596
596
>>> MYodML.version = 42
@@ -605,7 +605,7 @@ Now, let's define the date attribute of the Document::
605
605
>>> MYodML.date = dt.date(1979, 10, 12)
606
606
607
607
Next, let us also add a repository attribute. Exemplary, we can import the
608
- Python package os to extract the absolut path to our previously used example
608
+ Python package os to extract the absolute path to our previously used example
609
609
odML file and add this as repository::
610
610
611
611
>>> import os
@@ -617,17 +617,17 @@ fiddled with.
617
617
618
618
Check if your new Document contains actually all attributes now::
619
619
620
- >>> print(odmlEX .author)
620
+ >>> print(MYodML .author)
621
621
D. N. Adams
622
- >>> print(odmlfile .date)
622
+ >>> print(MYodML .date)
623
623
1979-10-12
624
- >>> print(odmlEX .document)
625
- <Doc 42 by D. N. Adams (2 sections)>
626
- >>> print(odmlEX .parent)
624
+ >>> print(MYodML .document)
625
+ <Doc 42 by D. N. Adams (0 sections)>
626
+ >>> print(MYodML .parent)
627
627
None
628
- >>> print(odmlEX .repository)
628
+ >>> print(MYodML .repository)
629
629
file:///home/usr/.../python-odml/doc/example_odMLs/THGTTG.odml
630
- >>> print(odmlEX .version)
630
+ >>> print(MYodML .version)
631
631
42
632
632
633
633
Note that you can also define all attributes when first creating a Document::
0 commit comments