/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/xml8.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-09 02:31:23 UTC
  • mfrom: (4090.2.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090309023123-7hvnfrilrt5ql771
compare types with is not '=' (Benjamin Peterson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    # to check if None, rather than try/KeyError
93
93
    text = _map.get(unicode_or_utf8_str)
94
94
    if text is None:
95
 
        if unicode_or_utf8_str.__class__ == unicode:
 
95
        if unicode_or_utf8_str.__class__ is unicode:
96
96
            # The alternative policy is to do a regular UTF8 encoding
97
97
            # and then escape only XML meta characters.
98
98
            # Performance is equivalent once you use cache_utf8. *However*
128
128
    # This is fairly optimized because we know what cElementTree does, this is
129
129
    # not meant as a generic function for all cases. Because it is possible for
130
130
    # an 8-bit string to not be ascii or valid utf8.
131
 
    if a_str.__class__ == unicode:
 
131
    if a_str.__class__ is unicode:
132
132
        return _encode_utf8(a_str)
133
133
    else:
134
134
        return intern(a_str)