Code review comment for ~cjwatson/launchpad:ci-build-upload-make-spr

Revision history for this message
Andrey Fedoseev (andrey-fedoseev) wrote :

> 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