Function
mechanize._clientcookie.reach

Signature

reach(h)

Documentation String

Return reach of host h, as defined by RFC 2965, section 1.

The reach R of a host name H is defined as follows:

  • If
    • H is the host domain name of a host; and,
    • H has the form A.B; and
    • A has no embedded (that is, interior) dots; and
    • B has at least one embedded dot, or B is the string "local". then the reach of H is .B.
  • Otherwise, the reach of H is H.

>>> reach("www.acme.com") .acme.com >>> reach("acme.com") acme.com >>> reach("acme.local") .local