MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/http/cookiejar.py:762–802  ·  view source on GitHub ↗
(self, version, name, value,
                 port, port_specified,
                 domain, domain_specified, domain_initial_dot,
                 path, path_specified,
                 secure,
                 expires,
                 discard,
                 comment,
                 comment_url,
                 rest,
                 rfc2109=False,
                 )

Source from the content-addressed store, hash-verified

760 """
761
762 def __init__(self, version, name, value,
763 port, port_specified,
764 domain, domain_specified, domain_initial_dot,
765 path, path_specified,
766 secure,
767 expires,
768 discard,
769 comment,
770 comment_url,
771 rest,
772 rfc2109=False,
773 ):
774
775 if version is not None: version = int(version)
776 if expires is not None: expires = int(float(expires))
777 if port is None and port_specified is True:
778 raise ValueError("if port is None, port_specified must be false")
779
780 self.version = version
781 self.name = name
782 self.value = value
783 self.port = port
784 self.port_specified = port_specified
785 # normalise case, as per RFC 2965 section 3.3.3
786 self.domain = domain.lower()
787 self.domain_specified = domain_specified
788 # Sigh. We need to know whether the domain given in the
789 # cookie-attribute had an initial dot, in order to follow RFC 2965
790 # (as clarified in draft errata). Needed for the returned $Domain
791 # value.
792 self.domain_initial_dot = domain_initial_dot
793 self.path = path
794 self.path_specified = path_specified
795 self.secure = secure
796 self.expires = expires
797 self.discard = discard
798 self.comment = comment
799 self.comment_url = comment_url
800 self.rfc2109 = rfc2109
801
802 self._rest = copy.copy(rest)
803
804 def has_nonstandard_attr(self, name):
805 return name in self._rest

Callers 1

__init__Method · 0.45

Calls 2

lowerMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected