From 98d9fd3e68075ce6fe7642ed8793c1abee69edf6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 28 Feb 2000 15:12:25 +0000 Subject: [PATCH] Simple changes by Gerrit Holl - move author acknowledgements out of docstrings into comments. --- Lib/StringIO.py | 2 ++ Lib/cgi.py | 29 ++++++++++++++--------------- Lib/code.py | 3 ++- Lib/ftplib.py | 10 +++++----- Lib/getpass.py | 5 +++-- Lib/imaplib.py | 8 ++++---- Lib/poplib.py | 8 ++++---- Lib/smtplib.py | 16 ++++++++-------- Lib/whrandom.py | 8 ++++---- 9 files changed, 46 insertions(+), 43 deletions(-) diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 04ffec9c4db..8efd7d8c48f 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -19,6 +19,8 @@ f.getvalue() # return whole file's contents as a string Notes: - Using a real file is often faster (but less convenient). +- There's also a much faster implementation in C, called cStringIO, but + it's not subclassable. - fileno() is left unimplemented so that code which uses it triggers an exception early. - Seeking far beyond EOF and then writing will insert real null diff --git a/Lib/cgi.py b/Lib/cgi.py index d69da04fabe..4eaa983e4d1 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -399,23 +399,22 @@ or written by every user on the system. - Don't try to give a CGI script a set-uid mode. This doesn't work on most systems, and is a security liability as well. - -History -------- - -Michael McLay started this module. Steve Majewski changed the -interface to SvFormContentDict and FormContentDict. The multipart -parsing was inspired by code submitted by Andreas Paepcke. Guido van -Rossum rewrote, reformatted and documented the module and is currently -responsible for its maintenance. - - -XXX The module is getting pretty heavy with all those docstrings. -Perhaps there should be a slimmed version that doesn't contain all those -backwards compatible and debugging classes and functions? - """ +# XXX The module is getting pretty heavy with all those docstrings. +# Perhaps there should be a slimmed version that doesn't contain all those +# backwards compatible and debugging classes and functions? + +# History +# ------- +# +# Michael McLay started this module. Steve Majewski changed the +# interface to SvFormContentDict and FormContentDict. The multipart +# parsing was inspired by code submitted by Andreas Paepcke. Guido van +# Rossum rewrote, reformatted and documented the module and is currently +# responsible for its maintenance. +# + __version__ = "2.2" diff --git a/Lib/code.py b/Lib/code.py index 6d8c35cd1e7..5f65b7c9946 100644 --- a/Lib/code.py +++ b/Lib/code.py @@ -1,8 +1,9 @@ """Utilities needed to emulate Python's interactive interpreter. -Inspired by similar code by Jeff Epler and Fredrik Lundh. """ +# Inspired by similar code by Jeff Epler and Fredrik Lundh. + import sys import string diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 94ae880142c..9e3b701d2c9 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -3,11 +3,6 @@ Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds -Changes and improvements suggested by Steve Majewski. -Modified by Jack to work on the mac. -Modified by Siebren to support docstrings and PASV. - - Example: >>> from ftplib import FTP @@ -34,6 +29,11 @@ A nice test that reveals some of the network dialogue would be: python ftplib.py -d localhost -l -p -l """ +# +# Changes and improvements suggested by Steve Majewski. +# Modified by Jack to work on the mac. +# Modified by Siebren to support docstrings and PASV. +# import os import sys diff --git a/Lib/getpass.py b/Lib/getpass.py index 19843d73c59..b81026f6abe 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -6,10 +6,11 @@ getuser() - get the user name from the environment or password database On Windows, the msvcrt module will be used. On the Mac EasyDialogs.AskPassword is used, if available. -Authors: Piers Lauder (original) - Guido van Rossum (Windows support and cleanup) """ +# Authors: Piers Lauder (original) +# Guido van Rossum (Windows support and cleanup) + import sys def unix_getpass(prompt='Password: '): diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 898dd9fcccc..9389b221910 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -3,10 +3,6 @@ Based on RFC 2060. -Author: Piers Lauder December 1997. - -Authentication code contributed by Donn Cave June 1998. - Public class: IMAP4 Public variable: Debug Public functions: Internaldate2tuple @@ -15,6 +11,10 @@ Public functions: Internaldate2tuple Time2Internaldate """ +# Author: Piers Lauder December 1997. +# +# Authentication code contributed by Donn Cave June 1998. + __version__ = "2.32" import binascii, re, socket, string, time, random, sys diff --git a/Lib/poplib.py b/Lib/poplib.py index 251a71237cf..a4fd2bc32c8 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -1,12 +1,12 @@ """A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 - -Author: David Ascher - [heavily stealing from nntplib.py] -Updated: Piers Lauder [Jul '97] """ +# Author: David Ascher +# [heavily stealing from nntplib.py] +# Updated: Piers Lauder [Jul '97] + # Example (see the test function at the end of this file) TESTSERVER = "localhost" diff --git a/Lib/smtplib.py b/Lib/smtplib.py index df8907da0f4..f58d5fc10d7 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -2,14 +2,6 @@ """SMTP/ESMTP client class. -Author: The Dragon De Monsyne -ESMTP support, test code and doc fixes added by - Eric S. Raymond -Better RFC 821 compliance (MAIL and RCPT, and CRLF in data) - by Carey Evans , for picky mail servers. - -This was modified from the Python 1.5 library HTTP lib. - This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). Notes: @@ -39,6 +31,14 @@ Example: >>> s.quit() """ +# Author: The Dragon De Monsyne +# ESMTP support, test code and doc fixes added by +# Eric S. Raymond +# Better RFC 821 compliance (MAIL and RCPT, and CRLF in data) +# by Carey Evans , for picky mail servers. +# +# This was modified from the Python 1.5 library HTTP lib. + import socket import string import re diff --git a/Lib/whrandom.py b/Lib/whrandom.py index fd9b1a9390f..8cc165024e6 100644 --- a/Lib/whrandom.py +++ b/Lib/whrandom.py @@ -25,10 +25,6 @@ There is also an interface to create multiple independent random generators, and to choose from other ranges. -Translated by Guido van Rossum from C source provided by -Adrian Baddeley. - - Multi-threading note: the random number generator used here is not thread-safe; it is possible that nearly simultaneous calls in @@ -37,6 +33,10 @@ have to use a lock around all calls. (I didn't want to slow this down in the serial case by using a lock here.) """ +# Translated by Guido van Rossum from C source provided by +# Adrian Baddeley. + + class whrandom: def __init__(self, x = 0, y = 0, z = 0): """Initialize an instance.