Commits

Michał Górny committed 4e862d4

Python3: replace itertools.imap() with map().

Comments (0)

Files changed (2)

gentoopm/paludispm/pkg.py

 # (c) 2011 Michał Górny <mgorny@gentoo.org>
 # Released under the terms of the 2-clause BSD license.
 
-import itertools
 import paludis
 
 from ..basepm.depend import PMRequiredUseAtom
 	@property
 	def homepages(self):
 		spec = self._get_meta(self._pkg.homepage_key())
-		return SpaceSepTuple(itertools.imap(str, spec))
+		return SpaceSepTuple(map(str, spec))
 
 	@property
 	def keywords(self):
 		kws = self._get_meta(self._pkg.keywords_key())
-		return SpaceSepFrozenSet(itertools.imap(str, kws))
+		return SpaceSepFrozenSet(map(str, kws))
 
 	@property
 	def slot(self):

gentoopm/portagepm/pkg.py

 # (c) 2011 Michał Górny <mgorny@gentoo.org>
 # Released under the terms of the 2-clause BSD license.
 
-import itertools
 from portage.versions import cpv_getkey, cpv_getversion, vercmp
 
 from ..basepm.depend import PMRequiredUseAtom
 		return PortagePackageVersion(self._cpv)
 
 	def _aux_get(self, *keys):
-		val = itertools.imap(str, self._dbapi.aux_get(self._cpv, keys))
+		val = map(str, self._dbapi.aux_get(self._cpv, keys))
 		if len(keys) == 1:
 			return next(iter(val))
 		else:
 		return self._dbapi.getRepositoryName(self._tree)
 
 	def _aux_get(self, *keys):
-		val = itertools.imap(str, self._dbapi.aux_get(self._cpv,
-				keys, mytree = self._tree))
+		val = map(str, self._dbapi.aux_get(self._cpv, keys,
+				mytree = self._tree))
 		if len(keys) == 1:
 			return next(iter(val))
 		else: