用 MIT 必须开源衍生吗
按模型,must_open_source("MIT") 交回什么?
许可证模型:宽松许可 {MIT, BSD, Apache}、copyleft {GPL, AGPL}。is_permissive 是不是宽松、must_open_source=衍生作品是否也必须开源。
PERMISSIVE = {"MIT", "BSD", "Apache"}
COPYLEFT = {"GPL", "AGPL"}
def is_permissive(lic):
"""是不是宽松许可证(用起来限制少)。"""
return lic in PERMISSIVE
def must_open_source(lic):
"""用了它、衍生作品是否必须也开源(copyleft)。"""
return lic in COPYLEFT
print(must_open_source("MIT"))
全部评论