def __init__(self, address, strict=True):
_BaseNetwork.__init__(self, address)<EOL>if isinstance(address, (bytes, _compat_int_types)):<EOL><INDENT>self.network_address = IPv6Address(address)<EOL>self.netmask, self._prefixlen = self._make_netmask(<EOL>self._max_prefixlen)<EOL>return<EOL><DEDENT>if isinstance(address, tuple):<EOL><INDENT>if len(address) > <NUM_LIT:1>:<EOL><INDENT>arg = address[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>arg = self._max_prefixlen<EOL><DEDENT>self.netmask, self._prefixlen = self._make_netmask(arg)<EOL>self.network_address = IPv6Address(address[<NUM_LIT:0>])<EOL>packed = int(self.network_address)<EOL>if packed & int(self.netmask) != packed:<EOL><INDENT>if strict:<EOL><INDENT>raise ValueError('<STR_LIT>' % self)<EOL><DEDENT>else:<EOL><INDENT>self.network_address = IPv6Address(packed &<EOL>int(self.netmask))<EOL><DEDENT><DEDENT>return<EOL><DEDENT>addr = _split_optional_netmask(address)<EOL>self.network_address = IPv6Address(self._ip_int_from_string(addr[<NUM_LIT:0>]))<EOL>if len(addr) == <NUM_LIT:2>:<EOL><INDENT>arg = addr[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>arg = self._max_prefixlen<EOL><DEDENT>self.netmask, self._prefixlen = self._make_netmask(arg)<EOL>if strict:<EOL><INDENT>if (IPv6Address(int(self.network_address) & int(self.netmask)) !=<EOL>self.network_address):<EOL><INDENT>raise ValueError('<STR_LIT>' % self)<EOL><DEDENT><DEDENT>self.network_address = IPv6Address(int(self.network_address) &<EOL>int(self.netmask))<EOL>if self._prefixlen == (self._max_prefixlen - <NUM_LIT:1>):<EOL><INDENT>self.hosts = self.__iter__<EOL><DEDENT>
Instantiate a new IPv6 Network object.

        Args:
            address: A string or integer representing the IPv6 network or the
              IP and prefix/netmask.
              '2001:db8::/128'
              '2001:db8:0000:0000:0000:0000:0000:0000/128'
              '2001:db8::'
              are all functionally the same in IPv6.  That is to say,
              failing to provide a subnetmask will create an object with
              a mask of /128.

              Additionally, an integer can be passed, so
              IPv6Network('2001:db8::') ==
                IPv6Network(42540766411282592856903984951653826560)
              or, more generally
              IPv6Network(int(IPv6Network('2001:db8::'))) ==
                IPv6Network('2001:db8::')

            strict: A boolean. If true, ensure that we have been passed
              A true network address, eg, 2001:db8::1000/124 and not an
              IP address on a network, eg, 2001:db8::1/124.

        Raises:
            AddressValueError: If address isn't a valid IPv6 address.
            NetmaskValueError: If the netmask isn't valid for
              an IPv6 address.
            ValueError: If strict was True and a network address was not
              supplied.