Ejemplo n.º 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)
Ejemplo n.º 2
0
 def __init__(self, sequence=tuple()):
     DependencyCell.__init__(self)
     set.__init__(self, sequence)
Ejemplo n.º 3
0
 def __init__(self, iterable=None):
     '''Construct a multiset from an optional iterable.'''
     Set.__init__(self, iterable)
Ejemplo n.º 4
0
 def __init__(self, sequence=tuple()):
     DependencyCell.__init__(self)
     set.__init__(self, sequence)
Ejemplo n.º 5
0
 def __init__(self, *args):
     set.__init__(self, args)
Ejemplo n.º 6
0
 def __init__(self, iterable=None):
     Set.__init__(self)
     self._data = WeakKeyDictionary()
     if iterable is not None:
         self._update(iterable)
Ejemplo n.º 7
0
 def __init__(self, privacy=()):
     if privacy is None or privacy == '!':
         privacy = ()
     if isinstance(privacy, basestring):
         privacy = privacy.split(',')
     set.__init__(self, privacy)
Ejemplo n.º 8
0
 def __init__(self, iterable=None):
     Set.__init__(self, iterable)
Ejemplo n.º 9
0
 def __init__(self, privacy=()):
     if privacy is None or privacy == '!':
         privacy = ()
     if isinstance(privacy, basestring):
         privacy = privacy.split(',')
     set.__init__(self, privacy)
Ejemplo n.º 10
0
 def __init__(self, *args):
     set.__init__(self, args)
Ejemplo n.º 11
0
 def __init__(self, *args):
     print "starting with %s" % (args,)
     Set.__init__(self, *args)
Ejemplo n.º 12
0
 def __init__(self,iterable=None):
     Set.__init__(self,iterable)
Ejemplo n.º 13
0
 def __init__(self, rights=None):
     set.__init__(self)
     self.add(rights)
Ejemplo n.º 14
0
 def __init__(self,iterable=None):
     '''Construct a multiset from an optional iterable.'''
     Set.__init__(self,iterable)
Ejemplo n.º 15
0
 def __init__(self, rights=None):
     set.__init__(self)
     self.add(rights)