Whitespace normalization.

This commit is contained in:
Tim Peters 2001-01-15 00:50:52 +00:00
parent fa25a7d51f
commit 2344fae6d0
17 changed files with 3022 additions and 3024 deletions

View file

@ -89,4 +89,3 @@ class netrc:
if __name__ == '__main__': if __name__ == '__main__':
print netrc() print netrc()

View file

@ -34,7 +34,7 @@ import socket
import string import string
# Exceptions raised when an error or invalid response is received # Exceptions raised when an error or invalid response is received
class NNTPError(Exception): class NNTPError(Exception):
"""Base class for all nntplib exceptions""" """Base class for all nntplib exceptions"""
@ -73,7 +73,7 @@ error_proto = NNTPProtocolError
error_data = NNTPDataError error_data = NNTPDataError
# Standard port used by NNTP servers # Standard port used by NNTP servers
NNTP_PORT = 119 NNTP_PORT = 119
@ -86,7 +86,7 @@ LONGRESP = ['100', '215', '220', '221', '222', '224', '230', '231', '282']
CRLF = '\r\n' CRLF = '\r\n'
# The class itself # The class itself
class NNTP: class NNTP:
def __init__(self, host, port=NNTP_PORT, user=None, password=None, def __init__(self, host, port=NNTP_PORT, user=None, password=None,

View file

@ -653,51 +653,51 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def help_h(self): def help_h(self):
print """h(elp) print """h(elp)
Without argument, print the list of available commands. Without argument, print the list of available commands.
With a command name as argument, print help about that command With a command name as argument, print help about that command
"help pdb" pipes the full documentation file to the $PAGER "help pdb" pipes the full documentation file to the $PAGER
"help exec" gives help on the ! command""" "help exec" gives help on the ! command"""
def help_where(self): def help_where(self):
self.help_w() self.help_w()
def help_w(self): def help_w(self):
print """w(here) print """w(here)
Print a stack trace, with the most recent frame at the bottom. Print a stack trace, with the most recent frame at the bottom.
An arrow indicates the "current frame", which determines the An arrow indicates the "current frame", which determines the
context of most commands.""" context of most commands."""
def help_down(self): def help_down(self):
self.help_d() self.help_d()
def help_d(self): def help_d(self):
print """d(own) print """d(own)
Move the current frame one level down in the stack trace Move the current frame one level down in the stack trace
(to an older frame).""" (to an older frame)."""
def help_up(self): def help_up(self):
self.help_u() self.help_u()
def help_u(self): def help_u(self):
print """u(p) print """u(p)
Move the current frame one level up in the stack trace Move the current frame one level up in the stack trace
(to a newer frame).""" (to a newer frame)."""
def help_break(self): def help_break(self):
self.help_b() self.help_b()
def help_b(self): def help_b(self):
print """b(reak) ([file:]lineno | function) [, condition] print """b(reak) ([file:]lineno | function) [, condition]
With a line number argument, set a break there in the current With a line number argument, set a break there in the current
file. With a function name, set a break at first executable line file. With a function name, set a break at first executable line
of that function. Without argument, list all breaks. If a second of that function. Without argument, list all breaks. If a second
argument is present, it is a string specifying an expression argument is present, it is a string specifying an expression
which must evaluate to true before the breakpoint is honored. which must evaluate to true before the breakpoint is honored.
The line number may be prefixed with a filename and a colon, The line number may be prefixed with a filename and a colon,
to specify a breakpoint in another file (probably one that to specify a breakpoint in another file (probably one that
hasn't been loaded yet). The file is searched for on sys.path; hasn't been loaded yet). The file is searched for on sys.path;
the .py suffix may be omitted.""" the .py suffix may be omitted."""
def help_clear(self): def help_clear(self):
self.help_cl() self.help_cl()
@ -705,67 +705,67 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def help_cl(self): def help_cl(self):
print "cl(ear) filename:lineno" print "cl(ear) filename:lineno"
print """cl(ear) [bpnumber [bpnumber...]] print """cl(ear) [bpnumber [bpnumber...]]
With a space separated list of breakpoint numbers, clear With a space separated list of breakpoint numbers, clear
those breakpoints. Without argument, clear all breaks (but those breakpoints. Without argument, clear all breaks (but
first ask confirmation). With a filename:lineno argument, first ask confirmation). With a filename:lineno argument,
clear all breaks at that line in that file. clear all breaks at that line in that file.
Note that the argument is different from previous versions of Note that the argument is different from previous versions of
the debugger (in python distributions 1.5.1 and before) where the debugger (in python distributions 1.5.1 and before) where
a linenumber was used instead of either filename:lineno or a linenumber was used instead of either filename:lineno or
breakpoint numbers.""" breakpoint numbers."""
def help_tbreak(self): def help_tbreak(self):
print """tbreak same arguments as break, but breakpoint is print """tbreak same arguments as break, but breakpoint is
removed when first hit.""" removed when first hit."""
def help_enable(self): def help_enable(self):
print """enable bpnumber [bpnumber ...] print """enable bpnumber [bpnumber ...]
Enables the breakpoints given as a space separated list of Enables the breakpoints given as a space separated list of
bp numbers.""" bp numbers."""
def help_disable(self): def help_disable(self):
print """disable bpnumber [bpnumber ...] print """disable bpnumber [bpnumber ...]
Disables the breakpoints given as a space separated list of Disables the breakpoints given as a space separated list of
bp numbers.""" bp numbers."""
def help_ignore(self): def help_ignore(self):
print """ignore bpnumber count print """ignore bpnumber count
Sets the ignore count for the given breakpoint number. A breakpoint Sets the ignore count for the given breakpoint number. A breakpoint
becomes active when the ignore count is zero. When non-zero, the becomes active when the ignore count is zero. When non-zero, the
count is decremented each time the breakpoint is reached and the count is decremented each time the breakpoint is reached and the
breakpoint is not disabled and any associated condition evaluates breakpoint is not disabled and any associated condition evaluates
to true.""" to true."""
def help_condition(self): def help_condition(self):
print """condition bpnumber str_condition print """condition bpnumber str_condition
str_condition is a string specifying an expression which str_condition is a string specifying an expression which
must evaluate to true before the breakpoint is honored. must evaluate to true before the breakpoint is honored.
If str_condition is absent, any existing condition is removed; If str_condition is absent, any existing condition is removed;
i.e., the breakpoint is made unconditional.""" i.e., the breakpoint is made unconditional."""
def help_step(self): def help_step(self):
self.help_s() self.help_s()
def help_s(self): def help_s(self):
print """s(tep) print """s(tep)
Execute the current line, stop at the first possible occasion Execute the current line, stop at the first possible occasion
(either in a function that is called or in the current function).""" (either in a function that is called or in the current function)."""
def help_next(self): def help_next(self):
self.help_n() self.help_n()
def help_n(self): def help_n(self):
print """n(ext) print """n(ext)
Continue execution until the next line in the current function Continue execution until the next line in the current function
is reached or it returns.""" is reached or it returns."""
def help_return(self): def help_return(self):
self.help_r() self.help_r()
def help_r(self): def help_r(self):
print """r(eturn) print """r(eturn)
Continue execution until the current function returns.""" Continue execution until the current function returns."""
def help_continue(self): def help_continue(self):
self.help_c() self.help_c()
@ -775,84 +775,84 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def help_c(self): def help_c(self):
print """c(ont(inue)) print """c(ont(inue))
Continue execution, only stop when a breakpoint is encountered.""" Continue execution, only stop when a breakpoint is encountered."""
def help_list(self): def help_list(self):
self.help_l() self.help_l()
def help_l(self): def help_l(self):
print """l(ist) [first [,last]] print """l(ist) [first [,last]]
List source code for the current file. List source code for the current file.
Without arguments, list 11 lines around the current line Without arguments, list 11 lines around the current line
or continue the previous listing. or continue the previous listing.
With one argument, list 11 lines starting at that line. With one argument, list 11 lines starting at that line.
With two arguments, list the given range; With two arguments, list the given range;
if the second argument is less than the first, it is a count.""" if the second argument is less than the first, it is a count."""
def help_args(self): def help_args(self):
self.help_a() self.help_a()
def help_a(self): def help_a(self):
print """a(rgs) print """a(rgs)
Print the arguments of the current function.""" Print the arguments of the current function."""
def help_p(self): def help_p(self):
print """p expression print """p expression
Print the value of the expression.""" Print the value of the expression."""
def help_exec(self): def help_exec(self):
print """(!) statement print """(!) statement
Execute the (one-line) statement in the context of Execute the (one-line) statement in the context of
the current stack frame. the current stack frame.
The exclamation point can be omitted unless the first word The exclamation point can be omitted unless the first word
of the statement resembles a debugger command. of the statement resembles a debugger command.
To assign to a global variable you must always prefix the To assign to a global variable you must always prefix the
command with a 'global' command, e.g.: command with a 'global' command, e.g.:
(Pdb) global list_options; list_options = ['-l'] (Pdb) global list_options; list_options = ['-l']
(Pdb)""" (Pdb)"""
def help_quit(self): def help_quit(self):
self.help_q() self.help_q()
def help_q(self): def help_q(self):
print """q(uit) Quit from the debugger. print """q(uit) Quit from the debugger.
The program being executed is aborted.""" The program being executed is aborted."""
def help_whatis(self): def help_whatis(self):
print """whatis arg print """whatis arg
Prints the type of the argument.""" Prints the type of the argument."""
def help_EOF(self): def help_EOF(self):
print """EOF print """EOF
Handles the receipt of EOF as a command.""" Handles the receipt of EOF as a command."""
def help_alias(self): def help_alias(self):
print """alias [name [command [parameter parameter ...] ]] print """alias [name [command [parameter parameter ...] ]]
Creates an alias called 'name' the executes 'command'. The command Creates an alias called 'name' the executes 'command'. The command
must *not* be enclosed in quotes. Replaceable parameters are must *not* be enclosed in quotes. Replaceable parameters are
indicated by %1, %2, and so on, while %* is replaced by all the indicated by %1, %2, and so on, while %* is replaced by all the
parameters. If no command is given, the current alias for name parameters. If no command is given, the current alias for name
is shown. If no name is given, all aliases are listed. is shown. If no name is given, all aliases are listed.
Aliases may be nested and can contain anything that can be Aliases may be nested and can contain anything that can be
legally typed at the pdb prompt. Note! You *can* override legally typed at the pdb prompt. Note! You *can* override
internal pdb commands with aliases! Those internal commands internal pdb commands with aliases! Those internal commands
are then hidden until the alias is removed. Aliasing is recursively are then hidden until the alias is removed. Aliasing is recursively
applied to the first word of the command line; all other words applied to the first word of the command line; all other words
in the line are left alone. in the line are left alone.
Some useful aliases (especially when placed in the .pdbrc file) are: Some useful aliases (especially when placed in the .pdbrc file) are:
#Print instance variables (usage "pi classInst") #Print instance variables (usage "pi classInst")
alias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k] alias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k]
#Print instance variables in self #Print instance variables in self
alias ps pi self alias ps pi self
""" """
def help_unalias(self): def help_unalias(self):
print """unalias name print """unalias name
Deletes the specified alias.""" Deletes the specified alias."""
def help_pdb(self): def help_pdb(self):
help() help()

View file

@ -523,4 +523,3 @@ def count_calls(callers):
def f8(x): def f8(x):
return string.rjust(fpformat.fix(x, 3), 8) return string.rjust(fpformat.fix(x, 3), 8)