> I really don't think namedtuples are suitable here because of the lack of support for optional items in their constructors.
You're right, the optional values are available only since 3.7
> For plain classes, how do you propose spelling them?
I think you could use the constructor for that:
class SourceArtifactMetadata:
def __init__(self, format: SourcePackageFileType, name: str, version: str): self.format = format self.name = name self.version = version
« Back to merge proposal
> I really don't think namedtuples are suitable here because of the lack of support for optional items in their constructors.
You're right, the optional values are available only since 3.7
> For plain classes, how do you propose spelling them?
I think you could use the constructor for that:
class SourceArtifactM etadata:
def __init__(self, format: SourcePackageFi leType, name: str, version: str):
self. format = format
self. name = name
self. version = version