def __addSection( self ) :

		rootItem = self.__pathListing.getPath().rootItem()
		existingSectionNames = set( c.name() for c in rootItem if isinstance( c, _SectionLayoutItem ) )

		name = "New Section"
		index = 1
		while existingSectionNames in name :
			name = "New Section %d" % index
			index += 1

		rootItem.append( _SectionLayoutItem( name ) )

		self.__pathListing.getPath().pathChangedSignal()( self.__pathListing.getPath() )

		with Gaffer.UndoContext( self.__parent.ancestor( Gaffer.ScriptNode ) ) :
			self.__updateMetadata()

		self.__pathListing.setSelectedPaths(
			self.__pathListing.getPath().copy().setFromString( "/" + name )
		)
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/UIEditor.py/_PlugListing.__addSection/swapped operands of `in`