コード例 #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
ファイル: celltypes.py プロジェクト: eliask/SDP2011-Robotniks
 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
ファイル: base.py プロジェクト: timmartin19/turbogears
 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
ファイル: multiset.py プロジェクト: gpapadop79/gsakkis-utils
 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)