def __iadd__(self, other):
'''
In-place add features from two FeatureCollections.
>>> fc1 = FeatureCollection({'foo': Counter('abbb')})
>>> fc2 = FeatureCollection({'foo': Counter('bcc')})
>>> fc1 += fc2
FeatureCollection({'foo': Counter({'b': 4, 'c': 2, 'a': 1})})
Note that if a feature in either of the collections is not an
instance of :class:`collections.Counter`, then it is ignored.
'''
if self.read_only:
raise ReadOnlyException()
fc = self.merge_with(other, operator.iadd)
self._features = fc._features
return self
评论列表
文章目录