~ubuntu-branches/ubuntu/trusty/pyx/trusty

« back to all changes in this revision

Viewing changes to pyx/attr.py

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2009-10-29 23:47:39 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091029234739-cc178gmb3vp5828t
Tags: 0.10-1
* New maintainer (closes: #552750).
* Revert unneeded versioned build-dependency on python-all-dev.
* Add a preinst script to clean up after python-central (working around
  bug #479852 in python-central) (closes: #553271).
* Convert packaging to quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        else:
256
256
            return None
257
257
 
 
258
 
 
259
class multichangeattr(changeattr):
 
260
 
 
261
    """a changeable attr, which selects a changeable attr from
 
262
    a given dict (or list) of changeable attrs depending on the
 
263
    value of total in the select call"""
 
264
 
 
265
    def __init__(self, changeattrs):
 
266
        self.changeattrs = changeattrs
 
267
 
 
268
    def select(self, index, total):
 
269
        return self.changeattrs[total].select(index, total)
 
270