本文整理汇总了Python中util.joiniter函数的典型用法代码示例。如果您正苦于以下问题:Python joiniter函数的具体用法?Python joiniter怎么用?Python joiniter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了joiniter函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: resolve
def resolve(self, makefile, variables, fd, setting):
nfrom = self._arguments[0].resolvestr(makefile, variables, setting)
nto = self._arguments[1].resolvestr(makefile, variables, setting)
# TODO: provide better errors if this doesn't convert
nfrom = int(nfrom)
nto = int(nto)
words = list(self._arguments[2].resolvesplit(makefile, variables, setting))
if nfrom < 1:
nfrom = 1
if nto < 1:
nto = 1
util.joiniter(fd, words[nfrom - 1:nto])
示例2: resolve
def resolve(self, makefile, variables, fd, setting):
d = list(self._arguments[0].resolvesplit(makefile, variables, setting))
d.sort()
util.joiniter(fd, d)