这个包返回空速的燕子。
UnladenSwallow的Python项目详细描述
通过Karl Saint Lucy释放v0.2。
安装
$ pip install UnladenSwallow
功能
返回空载燕子的空速。你必须知道 当你是国王的时候,你知道的。
用法
很容易找到空载燕子的空速:
>>>fromunladen_swallow.unladen_swallowimportAirSpeedVelocityOfAnUnladenSwallow>>>a=AirSpeedVelocityOfAnUnladenSwallow()<unladen_swallow.AirSpeedVelocityOfAnUnladenSwallowobjectat0x123456789>>>>a.what_is_the_airspeed_velocity_of_an_unladen_swallow()'The airspeed velocity of a European swallow is 11 meters per second or 24milesperhour.Seehttp://style.org/unladenswallow/formoreinformation.'
代码库
"""A class for the airspeed velocity of an unladen swallow."""classAirSpeedVelocityOfAnUnladenSwallow:"""Class for the airspeed velocity of an unladen swallow."""species='European'meters_per_second=11miles_per_hour=24source='http://style.org/unladenswallow/'defwhat_is_the_airspeed_velocity_of_an_unladen_swallow(self):"""Return the airspeed velocity of an unladen swallow."""answer=('The airspeed velocity of a {0} swallow is {1} meters per ''second or {2} miles per hour. See {3} for more information.').format(self.species,self.meters_per_second,self.miles_per_hour,self.source)returnanswer
许可证
这个项目是由BSD License授权的。
阅读文档
请参阅Read the Docs上的狮身人面像文档。