/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 breezy/_static_tuple_py.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
strings.
21
21
"""
22
22
 
23
 
from __future__ import absolute_import
24
 
 
25
23
import sys
26
24
 
27
25
 
44
42
        for bit in args:
45
43
            if type(bit) not in _valid_types:
46
44
                raise TypeError('StaticTuple can only point to'
47
 
                    ' StaticTuple, str, unicode, int, float, bool, or'
48
 
                    ' None not %s' % (type(bit),))
 
45
                                ' StaticTuple, str, unicode, int, float, bool, or'
 
46
                                ' None not %s' % (type(bit),))
49
47
        # We don't need to pass args to tuple.__init__, because that was
50
48
        # already handled in __new__.
51
49
        tuple.__init__(self)
76
74
 
77
75
 
78
76
_valid_types = (bytes, str, StaticTuple, int, float, None.__class__, bool)
79
 
if sys.version_info < (3,):
80
 
    _valid_types += (long, unicode)
81
77
 
82
78
 
83
79
# Have to set it to None first, so that __new__ can determine whether