~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Martin Pool
  • Date: 2005-05-19 09:59:49 UTC
  • Revision ID: mbp@sourcefrog.net-20050519095949-2aaed7613265e594
- More cleanups for set type

- Clean up Inventory cmp method

- Remove the Inventory.id_set and Tree.id_set methods: don't built
  sets when just using the dictionaries will do.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
__copyright__ = "Copyright 2005 Canonical Development Ltd."
48
48
__author__ = "Martin Pool <mbp@canonical.com>"
49
49
__version__ = '0.0.5pre'
50
 
 
51
 
 
52
 
# in python2.4 there is a 'set' builtin type; in 2.3 we need to use
53
 
# the slower pure-python 'sets' module.
54
 
import sys
55
 
if sys.version_info < (2, 4):
56
 
    import sets
57
 
    set = sets.Set
58
 
    frozenset = sets.ImmutableSet
59
 
    del sets
60
 
else:
61
 
    import __builtin__
62
 
    set = __builtin__.set
63
 
    frozenset = __builtin__.frozenset
64
 
    del __builtin__
65