本文整理汇总了Python中team.Team.valid_team_name方法的典型用法代码示例。如果您正苦于以下问题:Python Team.valid_team_name方法的具体用法?Python Team.valid_team_name怎么用?Python Team.valid_team_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类team.Team
的用法示例。
在下文中一共展示了Team.valid_team_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: manages_team
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import valid_team_name [as 别名]
def manages_team(self, team_or_team_name):
# if it's a string get an internal representation
if isinstance(team_or_team_name, basestring):
if not Team.valid_team_name(team_or_team_name):
# raise?
return False
else:
team_or_team_name = Team(team_or_team_name)
return self._manages_team(team_or_team_name)