Skip to content

Commit 83ac178

Browse files
committed
[doc/tutorial] Update create document section
1 parent dae25af commit 83ac178

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/tutorial.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,9 @@ some of the commands you learned before::
588588
>>> <Doc None by None (0 sections)>
589589

590590
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::
594594

595595
>>> MYodML.author = 'D. N. Adams'
596596
>>> MYodML.version = 42
@@ -605,7 +605,7 @@ Now, let's define the date attribute of the Document::
605605
>>> MYodML.date = dt.date(1979, 10, 12)
606606

607607
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
609609
odML file and add this as repository::
610610

611611
>>> import os
@@ -617,17 +617,17 @@ fiddled with.
617617

618618
Check if your new Document contains actually all attributes now::
619619

620-
>>> print(odmlEX.author)
620+
>>> print(MYodML.author)
621621
D. N. Adams
622-
>>> print(odmlfile.date)
622+
>>> print(MYodML.date)
623623
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)
627627
None
628-
>>> print(odmlEX.repository)
628+
>>> print(MYodML.repository)
629629
file:///home/usr/.../python-odml/doc/example_odMLs/THGTTG.odml
630-
>>> print(odmlEX.version)
630+
>>> print(MYodML.version)
631631
42
632632

633633
Note that you can also define all attributes when first creating a Document::

0 commit comments

Comments
 (0)