From a2856af1d9289ee086b10768b53b65e0fd13a335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve=20Fr=C3=A9cinaux?= Date: Mon, 8 Sep 2008 19:27:51 +0200 Subject: Update tutorial to demonstrate dict-like tree objects. --- doc/tutorial.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tutorial.txt b/doc/tutorial.txt index 5ad56129..42e015b6 100644 --- a/doc/tutorial.txt +++ b/doc/tutorial.txt @@ -124,8 +124,8 @@ This tree contains three ``Blob`` objects and one ``Tree`` object. The trees are subdirectories and the blobs are files. Trees below the root have additional attributes. - >>> contents = tree.contents[-2] - + >>> contents = tree["lib"] + >>> contents.name 'test' @@ -134,7 +134,8 @@ additional attributes. '040000' There is a convenience method that allows you to get a named sub-object -from a tree. +from a tree with a syntax similar to how paths are written in an unix +system. >>> tree/"lib" -- cgit v1.2.3