예제 #1
0
	def __init__(self, *args) :
		# Handle special case when this __init__ is used as a copy constructor,
		# i.e. with Set or ifilter instance as a sole argument
		# This is needed to overcome flawed standard sets implementation in Python 2.3+
		if len(args) == 1 :
			x = args[0]
			if isinstance(x, (Set, itertools.ifilter)) :
				_Set.__init__(self, x)
				return
		# ALARM : dependence on the sets.Set implementation !!!
		xargs = []
		for x in args :
			if isinstance(x, Keyword) :
				xargs.append(x)
			else :
				xargs.append(Keyword(x))
		_Set.__init__(self, xargs)
예제 #2
0
 def __init__(self, sequence=tuple()):
     DependencyCell.__init__(self)
     set.__init__(self, sequence)
예제 #3
0
 def __init__(self, iterable=None):
     '''Construct a multiset from an optional iterable.'''
     Set.__init__(self, iterable)
예제 #4
0
 def __init__(self, sequence=tuple()):
     DependencyCell.__init__(self)
     set.__init__(self, sequence)
예제 #5
0
파일: base.py 프로젝트: OnShift/turbogears
 def __init__(self, *args):
     set.__init__(self, args)
예제 #6
0
파일: weak.py 프로젝트: FaithNahn/amsn2
 def __init__(self, iterable=None):
     Set.__init__(self)
     self._data = WeakKeyDictionary()
     if iterable is not None:
         self._update(iterable)
예제 #7
0
 def __init__(self, privacy=()):
     if privacy is None or privacy == '!':
         privacy = ()
     if isinstance(privacy, basestring):
         privacy = privacy.split(',')
     set.__init__(self, privacy)
예제 #8
0
 def __init__(self, iterable=None):
     Set.__init__(self, iterable)
예제 #9
0
 def __init__(self, privacy=()):
     if privacy is None or privacy == '!':
         privacy = ()
     if isinstance(privacy, basestring):
         privacy = privacy.split(',')
     set.__init__(self, privacy)
예제 #10
0
 def __init__(self, *args):
     set.__init__(self, args)
예제 #11
0
 def __init__(self, *args):
     print "starting with %s" % (args,)
     Set.__init__(self, *args)
예제 #12
0
파일: annotkit.py 프로젝트: YuJinhui/kobas
 def __init__(self,iterable=None):
     Set.__init__(self,iterable)
예제 #13
0
 def __init__(self, rights=None):
     set.__init__(self)
     self.add(rights)
예제 #14
0
 def __init__(self,iterable=None):
     '''Construct a multiset from an optional iterable.'''
     Set.__init__(self,iterable)
예제 #15
0
 def __init__(self, rights=None):
     set.__init__(self)
     self.add(rights)