/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/_static_tuple_py.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-18 17:53:25 UTC
  • mfrom: (4756 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4758.
  • Revision ID: john@arbash-meinel.com-20091018175325-m7s57yrmm3bvj9b3
Merge in the latest bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    def intern(self):
52
52
        return _interned_tuples.setdefault(self, self)
53
53
 
 
54
    @staticmethod
 
55
    def from_sequence(seq):
 
56
        """Convert a sequence object into a StaticTuple instance."""
 
57
        if isinstance(seq, StaticTuple):
 
58
            # it already is
 
59
            return seq
 
60
        return StaticTuple(*seq)
 
61
 
 
62
 
54
63
 
55
64
# Have to set it to None first, so that __new__ can determine whether
56
65
# the _empty_tuple singleton has been created yet or not.