[email protected] wrote:
On Wed, Feb 03, 2010 at 07:32:15PM -0800, Brock Pytlik wrote:
Webrev:
http://cr.opensolaris.org/~bpytlik/ips-14177-v1/
Would it be possible to eschew itertools and the associated generator
function in fmri, in favor of list of the hierarchical names?
That is, would it be correct to write the code as the following?
lst = [ fmri_obj.get_pkg_stem(include_scheme=False),
str(fmri_obj.version.build_release),
str(fmri_obj.version.release),
str(fmri_obj.version.timestr)
]
lst.extend(fmri_obj.hierarchical_names())
return [
(self.name, self.attrs["name"], w,
fmri_obj.get_pkg_stem(include_scheme=False))
for w in lst
]
This would reduce the number of function calls we have to make, and
would have the returned list-comprehension only iterate over a single
list, constructed with one function call.
Sure, I'm fine with that.
-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss