本文整理汇总了Python中xmlbuilder.XMLBuilder.story_type方法的典型用法代码示例。如果您正苦于以下问题:Python XMLBuilder.story_type方法的具体用法?Python XMLBuilder.story_type怎么用?Python XMLBuilder.story_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xmlbuilder.XMLBuilder
的用法示例。
在下文中一共展示了XMLBuilder.story_type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_story_xml
# 需要导入模块: from xmlbuilder import XMLBuilder [as 别名]
# 或者: from xmlbuilder.XMLBuilder import story_type [as 别名]
def make_story_xml(self, name=None, description=None, story_type=None,
owned_by=None, requested_by=None, estimate=None, current_state=None, labels=None):
story = XMLBuilder('story')
if name is not None:
story.name(name)
if description is not None:
story.description(description)
if requested_by is not None:
story.requested_by(requested_by)
if owned_by is not None:
story.owned_by(owned_by)
if story_type is not None:
story.story_type(story_type)
if estimate is not None:
story.estimate(str(estimate), type='integer')
if current_state is not None:
story.current_state(current_state)
if labels is not None:
label_string = ','
if labels:
label_string = ','.join(labels)
story.labels(label_string)
return str(story)