~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 06:37:21 UTC
  • Revision ID: mbp@sourcefrog.net-20050519063721-555aeba2dc1f659d
- use builtin set object in python2.4 
  (suggested by Mario Pernici)
- clean up some uses of set() that can simply be lists or dicts
- remove some imports from the bzrlib namespace 

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
import locale
44
44
user_encoding = locale.getpreferredencoding()
 
45
del locale
45
46
 
46
47
__copyright__ = "Copyright 2005 Canonical Development Ltd."
47
48
__author__ = "Martin Pool <mbp@canonical.com>"
48
49
__version__ = '0.0.5pre'
49
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