def __init__(self, type_, version, patterns, parser, comment=None):
self._version = version<EOL>self._type = type_<EOL>self._patterns = patterns<EOL>self._comment = comment<EOL>self._parser = parser<EOL>
Create a new knitting pattern set.

        This is the class for a set of :class:`knitting patterns
        <knittingpattern.KnittingPattern.KnittingPattern>`.

        :param str type: the type of the knitting pattern set, see the
          :ref:`specification <FileFormatSpecification>`.
        :param str version: the version of the knitting pattern set.
          This is not the version of the library but the version of the
          :ref:`specification <FileFormatSpecification>`.
        :param patterns: a collection of patterns. This should be a
          :class:`~knittingpattern.IdCollection.IdCollection` of
          :class:`KnittingPatterns
          <knittingpattern.KnittingPattern.KnittingPattern>`.
        :param comment: a comment about the knitting pattern