~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/basicio.py

  • Committer: Martin Pool
  • Date: 2005-10-30 06:36:17 UTC
  • mto: (1185.33.49 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1512.
  • Revision ID: mbp@sourcefrog.net-20051030063617-309bc4b4179e0ceb
Add len(Stanza)

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                return True
95
95
        return False
96
96
 
 
97
    def __len__(self):
 
98
        """Return number of pairs in the stanza."""
 
99
        return len(self.items)
 
100
 
97
101
    def iter_pairs(self):
98
102
        """Return iterator of tag, value pairs."""
99
103
        return iter(self.items)