Fix python example so it runs

This commit is contained in:
Ryan Nowakowski 2014-05-15 21:29:54 -05:00
parent ab921cca0c
commit ed9cc46b49

View file

@ -8496,8 +8496,8 @@ Here is how you would traverse all the postings in your data file:
@smallexample
import ledger
for xact in ledger.read_journal("sample.dat").xacts:
for post in xact.posts:
for xact in ledger.read_journal("sample.dat").xacts():
for post in xact.posts():
print "Transferring %s to/from %s" % (post.amount, post.account)
@end smallexample