用 MIT 必须开源衍生吗

👁️ 3 人浏览 💬 0 人评论 ❤️ 添加收藏

按模型,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"))
提交你的答案
请登录后提交答案。
去登录
代码编辑器
Ctrl + Enter 运行
本次输入:
输出:

                        
👩‍🏫
AI
💬 题目评论

全部评论