copyright.tex: Add 1995 to copyright message.
lib.tex: add libimp; remove bogus warning about lineii.
libmath.tex: document hypot().
libmd5.tex: rename md5.md5() to md5.new().
libposix.tex: document chown().
libposixfile.tex: openfile() instead of fileopen().
libsocket.tex: document gethostbyaddr().
libtypes.tex: add footnote explaining why readline() keeps the newline.
ref3.tex: correct typos, add back*quotes to index.
ref4.tex: don't use \verb inside footnote.
ref5.tex: explain repr() and str() and add them + back*quotes to index.
ref6.tex: correct typo, don't use \verb in footnote.
ref7.tex: don't use \verb in footnote.
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex
index 900cfac..d3901b2 100644
--- a/Doc/lib/lib.tex
+++ b/Doc/lib/lib.tex
@@ -50,6 +50,7 @@
 \input{libmods}			% Built-in modules
 \input{libsys}
 \input{libbltin}		% really __builtin__
+\input{libimp}
 \input{libmain}			% really __main__
 \input{libarray}
 \input{libmath}
@@ -73,7 +74,7 @@
 \input{libgdbm}
 \input{libgrp}
 \input{libposix}
-\input{libposixfile} % XXX this uses lineii which partparse.py doesn't know
+\input{libposixfile}
 \input{libppath}		% really posixpath
 \input{libpwd}
 \input{libselect}
diff --git a/Doc/lib/libmath.tex b/Doc/lib/libmath.tex
index c26e849..6c6a90f 100644
--- a/Doc/lib/libmath.tex
+++ b/Doc/lib/libmath.tex
@@ -44,6 +44,7 @@
 \code{floor(\varvars{x})},
 \code{fmod(\varvars{x\, y})},
 \code{frexp(\varvars{x})},
+\code{hypot(\varvars{x\, y})},
 \code{ldexp(\varvars{x\, y})},
 \code{log(\varvars{x})},
 \code{log10(\varvars{x})},
@@ -61,6 +62,9 @@
 return a pair of values, rather than returning their second return
 value through an `output parameter' (there is no such thing in Python).
 
+The \code{hypot} function, which is not standard C, is not available
+on all platforms.
+
 The module also defines two mathematical constants:
 \iftexi
 \begin{datadesc}{pi}
diff --git a/Doc/lib/libmd5.tex b/Doc/lib/libmd5.tex
index edaa727..3e22820 100644
--- a/Doc/lib/libmd5.tex
+++ b/Doc/lib/libmd5.tex
@@ -15,8 +15,8 @@
 to obtain the digest of the string \code{'abc'}, use \ldots
 
 \bcode\begin{verbatim}
->>> from md5 import md5
->>> m = md5()
+>>> import md5
+>>> m = md5.new()
 >>> m.update('abc')
 >>> m.digest()
 '\220\001P\230<\322O\260\326\226?}(\341\177r'
@@ -25,16 +25,22 @@
 More condensed:
 
 \bcode\begin{verbatim}
->>> md5('abc').digest()
+>>> md5.new('abc').digest()
 '\220\001P\230<\322O\260\326\226?}(\341\177r'
 \end{verbatim}\ecode
 
 \renewcommand{\indexsubitem}{(in module md5)}
-\begin{funcdesc}{md5}{\optional{arg}}
+
+\begin{funcdesc}{new}{\optional{arg}}
   Create a new md5-object. If \var{arg} is present, an initial
   \code{update} method is called with \var{arg} as argument.
 \end{funcdesc}
 
+\begin{funcdesc}{md5}{\optional{arg}}
+For backward compatibility reasons, this is an alternative name for the
+\code{new} function.
+\end{funcdesc}
+
 An md5-object has the following methods:
 
 \renewcommand{\indexsubitem}{(md5 method)}
diff --git a/Doc/lib/libposix.tex b/Doc/lib/libposix.tex
index c22f1e0..987f746 100644
--- a/Doc/lib/libposix.tex
+++ b/Doc/lib/libposix.tex
@@ -50,6 +50,12 @@
 Change the mode of \var{path} to the numeric \var{mode}.
 \end{funcdesc}
 
+\begin{funcdesc}{chown}{path\, uid, gid}
+Change the owner and group id of \var{path} to the numeric \var{uid}
+and \var{gid}.
+(Not on MS-DOS.)
+\end{funcdesc}
+
 \begin{funcdesc}{close}{fd}
 Close file descriptor \var{fd}.
 \end{funcdesc}
diff --git a/Doc/lib/libposixfile.tex b/Doc/lib/libposixfile.tex
index 346f576..050ba5a 100644
--- a/Doc/lib/libposixfile.tex
+++ b/Doc/lib/libposixfile.tex
@@ -38,7 +38,7 @@
  builtin function.
 \end{funcdesc}
 
-\begin{funcdesc}{openfile}{fileobject}
+\begin{funcdesc}{fileopen}{fileobject}
  Create a new posixfile object with the given standard file object.
  The resulting object has the same filename and mode as the original
  file object.
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index 60b9d15..1026ef1 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -79,7 +79,16 @@
 Return a string containing the hostname of the machine where 
 the Python interpreter is currently executing.  If you want to know the
 current machine's IP address, use
-\code{socket.gethostbyname( socket.gethostname() )} instead.
+\code{socket.gethostbyname(socket.gethostname())} instead.
+\end{funcdesc}
+
+\begin{funcdesc}{gethostbyaddr}{ip_address}
+Return a triple \code{(hostname, aliaslist, ipaddrlist)} where
+\code{hostname} is the primary host name responding to the given
+\var{ip_address}, \code{aliaslist} is a (possibly empty) list of
+alternative host names for the same address, and \code{ipaddrlist} is
+a list of IP addresses for the same interface on the same
+host (most likely containing only a single address).
 \end{funcdesc}
 
 \begin{funcdesc}{getservbyname}{servicename\, protocolname}
diff --git a/Doc/lib/libtypes.tex b/Doc/lib/libtypes.tex
index b5dadaf..1d5beb4 100644
--- a/Doc/lib/libtypes.tex
+++ b/Doc/lib/libtypes.tex
@@ -580,7 +580,14 @@
 
 \begin{funcdesc}{readline}{}
   Read one entire line from the file.  A trailing newline character is
-  kept in the string (but may be absent when a file ends with an
+  kept in the string%
+\footnote{The advantage of leaving the newline on is that an empty string 
+	can be returned to mean \EOF{} without being ambiguous.  Another 
+	advantage is that (in cases where it might matter, e.g. if you 
+	want to make an exact copy of a file while scanning its lines) 
+	you can tell whether the last line of a file ended in a newline
+	or not (yes this happens!).}
+  (but may be absent when a file ends with an
   incomplete line).  An empty string is returned when \EOF{} is hit
   immediately.  Note: unlike \code{stdio}'s \code{fgets()}, the returned
   string contains null characters (\code{'\e 0'}) if they occurred in the