~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/plat-mac/Carbon/MediaDescr.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
            data = data[:self.size]
16
16
        values = struct.unpack(self.fmt, data)
17
17
        if len(values) != len(self.names):
18
 
            raise Error, ('Format length does not match number of names', descr)
 
18
            raise Error, ('Format length does not match number of names')
19
19
        rv = {}
20
20
        for i in range(len(values)):
21
21
            name = self.names[i]
26
26
            rv[name] = value
27
27
        return rv
28
28
 
29
 
    def encode(dict):
 
29
    def encode(self, dict):
30
30
        list = [self.fmt]
31
31
        for name in self.names:
32
32
            if type(name) == type(()):