def fromstr(cls, s, *, strict=True):
        """
        Construct a JID out of a string containing it.

        :param s: The string to parse.
        :type s: :class:`str`
        :param strict: Whether to enable strict parsing.
        :type strict: :class:`bool`
        :raises: See :class:`JID`
        :return: The parsed JID
        :rtype: :class:`JID`

        See the :class:`JID` class level documentation for the semantics of
        `strict`.
        """
        nodedomain, sep, resource = s.partition("/")
        if not sep:
            resource = None

        localpart, sep, domain = nodedomain.partition("@")
        if not sep:
            domain = localpart
            localpart = None
        return cls(localpart, domain, resource, strict=strict)
Construct a JID out of a string containing it.

        :param s: The string to parse.
        :type s: :class:`str`
        :param strict: Whether to enable strict parsing.
        :type strict: :class:`bool`
        :raises: See :class:`JID`
        :return: The parsed JID
        :rtype: :class:`JID`

        See the :class:`JID` class level documentation for the semantics of
        `strict`.