diff -r b66049748535 Lib/asynchat.py --- a/Lib/asynchat.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/asynchat.py Sat Jan 05 17:59:56 2013 +0200 @@ -50,7 +50,7 @@ from collections import deque -class async_chat (asyncore.dispatcher): +class async_chat(asyncore.dispatcher): """This is an abstract class. You must derive from this class, and add the two methods collect_incoming_data() and found_terminator()""" @@ -65,7 +65,7 @@ use_encoding = 0 encoding = 'latin-1' - def __init__ (self, sock=None, map=None): + def __init__(self, sock=None, map=None): # for string terminator matching self.ac_in_buffer = b'' @@ -96,13 +96,13 @@ def found_terminator(self): raise NotImplementedError("must be implemented in subclass") - def set_terminator (self, term): + def set_terminator(self, term): "Set the input delimiter. Can be a fixed string of any length, an integer, or None" if isinstance(term, str) and self.use_encoding: term = bytes(term, self.encoding) self.terminator = term - def get_terminator (self): + def get_terminator(self): return self.terminator # grab some more data from the socket, @@ -110,7 +110,7 @@ # check for the terminator, # if found, transition to the next state. - def handle_read (self): + def handle_read(self): try: data = self.recv (self.ac_in_buffer_size) @@ -178,13 +178,13 @@ self.collect_incoming_data (self.ac_in_buffer) self.ac_in_buffer = b'' - def handle_write (self): + def handle_write(self): self.initiate_send() - def handle_close (self): + def handle_close(self): self.close() - def push (self, data): + def push(self, data): sabs = self.ac_out_buffer_size if len(data) > sabs: for i in range(0, len(data), sabs): @@ -193,11 +193,11 @@ self.producer_fifo.append(data) self.initiate_send() - def push_with_producer (self, producer): + def push_with_producer(self, producer): self.producer_fifo.append(producer) self.initiate_send() - def readable (self): + def readable(self): "predicate for inclusion in the readable for select()" # cannot use the old predicate, it violates the claim of the # set_terminator method. @@ -205,11 +205,11 @@ # return (len(self.ac_in_buffer) <= self.ac_in_buffer_size) return 1 - def writable (self): + def writable(self): "predicate for inclusion in the writable for select()" return self.producer_fifo or (not self.connected) - def close_when_done (self): + def close_when_done(self): "automatically close this channel once the outgoing queue is empty" self.producer_fifo.append(None) @@ -255,7 +255,7 @@ # we tried to send some actual data return - def discard_buffers (self): + def discard_buffers(self): # Emergencies only! self.ac_in_buffer = b'' del self.incoming[:] @@ -263,11 +263,11 @@ class simple_producer: - def __init__ (self, data, buffer_size=512): + def __init__(self, data, buffer_size=512): self.data = data self.buffer_size = buffer_size - def more (self): + def more(self): if len (self.data) > self.buffer_size: result = self.data[:self.buffer_size] self.data = self.data[self.buffer_size:] @@ -278,25 +278,25 @@ return result class fifo: - def __init__ (self, list=None): + def __init__(self, list=None): if not list: self.list = deque() else: self.list = deque(list) - def __len__ (self): + def __len__(self): return len(self.list) - def is_empty (self): + def is_empty(self): return not self.list - def first (self): + def first(self): return self.list[0] - def push (self, data): + def push(self, data): self.list.append(data) - def pop (self): + def pop(self): if self.list: return (1, self.list.popleft()) else: @@ -317,7 +317,7 @@ # re: 12820/s # regex: 14035/s -def find_prefix_at_end (haystack, needle): +def find_prefix_at_end(haystack, needle): l = len(needle) - 1 while l and not haystack.endswith(needle[:l]): l -= 1 diff -r b66049748535 Lib/decimal.py --- a/Lib/decimal.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/decimal.py Sat Jan 05 17:59:56 2013 +0200 @@ -5409,7 +5409,7 @@ a = _convert_other(a, raiseit=True) return a.same_quantum(b) - def scaleb (self, a, b): + def scaleb(self, a, b): """Returns the first operand after adding the second value its exp. >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('-2')) diff -r b66049748535 Lib/email/_header_value_parser.py --- a/Lib/email/_header_value_parser.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/email/_header_value_parser.py Sat Jan 05 17:59:56 2013 +0200 @@ -1261,7 +1261,7 @@ return False def __getnewargs__(self): - return(str(self), self.token_type) + return (str(self), self.token_type) class WhiteSpaceTerminal(Terminal): diff -r b66049748535 Lib/idlelib/MultiCall.py --- a/Lib/idlelib/MultiCall.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/idlelib/MultiCall.py Sat Jan 05 17:59:56 2013 +0200 @@ -304,7 +304,7 @@ if widget in _multicall_dict: return _multicall_dict[widget] - class MultiCall (widget): + class MultiCall(widget): assert issubclass(widget, tkinter.Misc) def __init__(self, *args, **kwargs): diff -r b66049748535 Lib/idlelib/rpc.py --- a/Lib/idlelib/rpc.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/idlelib/rpc.py Sat Jan 05 17:59:56 2013 +0200 @@ -192,7 +192,7 @@ return ("OK", ret) elif how == 'QUEUE': request_queue.put((seq, (method, args, kwargs))) - return("QUEUED", None) + return ("QUEUED", None) else: return ("ERROR", "Unsupported message type: %s" % how) except SystemExit: diff -r b66049748535 Lib/logging/handlers.py --- a/Lib/logging/handlers.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/logging/handlers.py Sat Jan 05 17:59:56 2013 +0200 @@ -812,7 +812,7 @@ priority = self.priority_names[priority] return (facility << 3) | priority - def close (self): + def close(self): """ Closes the socket. """ diff -r b66049748535 Lib/optparse.py --- a/Lib/optparse.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/optparse.py Sat Jan 05 17:59:56 2013 +0200 @@ -99,7 +99,7 @@ _ = gettext -class OptParseError (Exception): +class OptParseError(Exception): def __init__(self, msg): self.msg = msg @@ -107,7 +107,7 @@ return self.msg -class OptionError (OptParseError): +class OptionError(OptParseError): """ Raised if an Option instance is created with invalid or inconsistent arguments. @@ -123,18 +123,18 @@ else: return self.msg -class OptionConflictError (OptionError): +class OptionConflictError(OptionError): """ Raised if conflicting options are added to an OptionParser. """ -class OptionValueError (OptParseError): +class OptionValueError(OptParseError): """ Raised if an invalid option value is encountered on the command line. """ -class BadOptionError (OptParseError): +class BadOptionError(OptParseError): """ Raised if an invalid option is seen on the command line. """ @@ -144,7 +144,7 @@ def __str__(self): return _("no such option: %s") % self.opt_str -class AmbiguousOptionError (BadOptionError): +class AmbiguousOptionError(BadOptionError): """ Raised if an ambiguous option is seen on the command line. """ @@ -363,7 +363,7 @@ return ", ".join(opts) -class IndentedHelpFormatter (HelpFormatter): +class IndentedHelpFormatter(HelpFormatter): """Format help with indented section bodies. """ @@ -382,7 +382,7 @@ return "%*s%s:\n" % (self.current_indent, "", heading) -class TitledHelpFormatter (HelpFormatter): +class TitledHelpFormatter(HelpFormatter): """Format help with underlined section headers. """ @@ -1077,7 +1077,7 @@ return "\n".join(result) -class OptionGroup (OptionContainer): +class OptionGroup(OptionContainer): def __init__(self, parser, title, description=None): self.parser = parser @@ -1107,7 +1107,7 @@ return result -class OptionParser (OptionContainer): +class OptionParser(OptionContainer): """ Class attributes: diff -r b66049748535 Lib/profile.py --- a/Lib/profile.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/profile.py Sat Jan 05 17:59:56 2013 +0200 @@ -259,7 +259,7 @@ timings[fn] = 0, 0, 0, 0, {} return 1 - def trace_dispatch_c_call (self, frame, t): + def trace_dispatch_c_call(self, frame, t): fn = ("", 0, self.c_func_name) self.cur = (t, 0, 0, fn, frame, self.cur) timings = self.timings diff -r b66049748535 Lib/pstats.py --- a/Lib/pstats.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/pstats.py Sat Jan 05 17:59:56 2013 +0200 @@ -447,7 +447,7 @@ def __init__(self, comp_select_list): self.comp_select_list = comp_select_list - def compare (self, left, right): + def compare(self, left, right): for index, direction in self.comp_select_list: l = left[index] r = right[index] diff -r b66049748535 Lib/pydoc.py --- a/Lib/pydoc.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/pydoc.py Sat Jan 05 17:59:56 2013 +0200 @@ -1932,7 +1932,7 @@ try: import pydoc_data.topics except ImportError: - return(''' + return (''' Sorry, topic and keyword documentation is not available because the module "pydoc_data.topics" could not be found. ''' , '') diff -r b66049748535 Lib/test/pyclbr_input.py --- a/Lib/test/pyclbr_input.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/pyclbr_input.py Sat Jan 05 17:59:56 2013 +0200 @@ -8,10 +8,10 @@ def om(self): pass -class B (object): +class B(object): def bm(self): pass -class C (B): +class C(B): foo = Other().foo om = Other.om diff -r b66049748535 Lib/test/test_asynchat.py --- a/Lib/test/test_asynchat.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_asynchat.py Sat Jan 05 17:59:56 2013 +0200 @@ -103,10 +103,10 @@ class TestAsynchat(unittest.TestCase): usepoll = False - def setUp (self): + def setUp(self): self._threads = support.threading_setup() - def tearDown (self): + def tearDown(self): support.threading_cleanup(*self._threads) def line_terminator_check(self, term, server_chunk): diff -r b66049748535 Lib/test/test_decorators.py --- a/Lib/test/test_decorators.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_decorators.py Sat Jan 05 17:59:56 2013 +0200 @@ -7,7 +7,7 @@ return func return decorate -class MiscDecorators (object): +class MiscDecorators(object): @staticmethod def author(name): def decorate(func): @@ -17,7 +17,7 @@ # ----------------------------------------------- -class DbcheckError (Exception): +class DbcheckError(Exception): def __init__(self, exprstr, func, args, kwds): # A real version of this would set attributes here Exception.__init__(self, "dbcheck %r failed (func=%s args=%s kwds=%s)" % @@ -228,7 +228,7 @@ return func return decorate - class NameLookupTracer (object): + class NameLookupTracer(object): def __init__(self, index): self.index = index diff -r b66049748535 Lib/test/test_exceptions.py --- a/Lib/test/test_exceptions.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_exceptions.py Sat Jan 05 17:59:56 2013 +0200 @@ -580,7 +580,7 @@ class Context: def __enter__(self): return self - def __exit__ (self, exc_type, exc_value, exc_tb): + def __exit__(self, exc_type, exc_value, exc_tb): return True obj = MyObj() wr = weakref.ref(obj) diff -r b66049748535 Lib/test/test_httpservers.py --- a/Lib/test/test_httpservers.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_httpservers.py Sat Jan 05 17:59:56 2013 +0200 @@ -496,7 +496,7 @@ HTTPResponseMatch = re.compile(b'HTTP/1.[0-9]+ 200 OK') - def setUp (self): + def setUp(self): self.handler = SocketlessRequestHandler() def send_typical_request(self, message): diff -r b66049748535 Lib/test/test_mailbox.py --- a/Lib/test/test_mailbox.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_mailbox.py Sat Jan 05 17:59:56 2013 +0200 @@ -843,10 +843,10 @@ self._box.lock() self._box.unlock() - def test_folder (self): + def test_folder(self): # Test for bug #1569790: verify that folders returned by .get_folder() # use the same factory function. - def dummy_factory (s): + def dummy_factory(s): return None box = self._factory(self._path, factory=dummy_factory) folder = box.add_folder('folder1') @@ -855,7 +855,7 @@ folder1_alias = box.get_folder('folder1') self.assertIs(folder1_alias._factory, dummy_factory) - def test_directory_in_folder (self): + def test_directory_in_folder(self): # Test that mailboxes still work if there's a stray extra directory # in a folder. for i in range(10): @@ -1162,7 +1162,7 @@ def test_get_folder(self): # Open folders - def dummy_factory (s): + def dummy_factory(s): return None self._box = self._factory(self._path, dummy_factory) diff -r b66049748535 Lib/test/test_mmap.py --- a/Lib/test/test_mmap.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_mmap.py Sat Jan 05 17:59:56 2013 +0200 @@ -480,7 +480,7 @@ m[start:stop:step] = data self.assertEqual(m[:], bytes(L)) - def make_mmap_file (self, f, halfsize): + def make_mmap_file(self, f, halfsize): # Write 2 pages worth of data to the file f.write (b'\0' * halfsize) f.write (b'foo') @@ -488,7 +488,7 @@ f.flush () return mmap.mmap (f.fileno(), 0) - def test_empty_file (self): + def test_empty_file(self): f = open (TESTFN, 'w+b') f.close() with open(TESTFN, "rb") as f : @@ -497,7 +497,7 @@ mmap.mmap, f.fileno(), 0, access=mmap.ACCESS_READ) - def test_offset (self): + def test_offset(self): f = open (TESTFN, 'w+b') try: # unlink TESTFN no matter what diff -r b66049748535 Lib/test/test_optparse.py --- a/Lib/test/test_optparse.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_optparse.py Sat Jan 05 17:59:56 2013 +0200 @@ -1026,7 +1026,7 @@ elif os.path.isfile(support.TESTFN): os.unlink(support.TESTFN) - class MyOption (Option): + class MyOption(Option): def check_file(option, opt, value): if not os.path.exists(value): raise OptionValueError("%s: file does not exist" % value) @@ -1062,7 +1062,7 @@ type="string", dest="apple")] self.parser = OptionParser(option_list=options) - class MyOption (Option): + class MyOption(Option): ACTIONS = Option.ACTIONS + ("extend",) STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",) TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extend",) diff -r b66049748535 Lib/test/test_poll.py --- a/Lib/test/test_poll.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_poll.py Sat Jan 05 17:59:56 2013 +0200 @@ -118,7 +118,7 @@ cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done' p = os.popen(cmd, 'r') pollster = select.poll() - pollster.register( p, select.POLLIN ) + pollster.register(p, select.POLLIN) for tout in (0, 1000, 2000, 4000, 8000, 16000) + (-1,)*10: fdlist = pollster.poll(tout) if (fdlist == []): diff -r b66049748535 Lib/test/test_readline.py --- a/Lib/test/test_readline.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_readline.py Sat Jan 05 17:59:56 2013 +0200 @@ -11,7 +11,7 @@ # Skip tests if there is no readline module readline = import_module('readline') -class TestHistoryManipulation (unittest.TestCase): +class TestHistoryManipulation(unittest.TestCase): @unittest.skipIf(not hasattr(readline, 'clear_history'), "The history update test cannot be run because the " diff -r b66049748535 Lib/test/test_socket.py --- a/Lib/test/test_socket.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_socket.py Sat Jan 05 17:59:56 2013 +0200 @@ -155,7 +155,7 @@ new threaded class from an existing unit test, use multiple inheritance: - class NewClass (OldClass, ThreadableTest): + class NewClass(OldClass, ThreadableTest): pass This class defines two new fixture functions with obvious diff -r b66049748535 Lib/test/test_ssl.py --- a/Lib/test/test_ssl.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_ssl.py Sat Jan 05 17:59:56 2013 +0200 @@ -1106,9 +1106,9 @@ # this one's based on asyncore.dispatcher - class EchoServer (asyncore.dispatcher): + class EchoServer(asyncore.dispatcher): - class ConnectionHandler (asyncore.dispatcher_with_send): + class ConnectionHandler(asyncore.dispatcher_with_send): def __init__(self, conn, certfile): self.socket = ssl.wrap_socket(conn, server_side=True, @@ -1200,7 +1200,7 @@ if support.verbose: sys.stdout.write(" cleanup: successfully joined.\n") - def start (self, flag=None): + def start(self, flag=None): self.flag = flag threading.Thread.start(self) diff -r b66049748535 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_subprocess.py Sat Jan 05 17:59:56 2013 +0200 @@ -2080,7 +2080,7 @@ @unittest.skipUnless(mswindows, "Windows-specific tests") -class CommandsWithSpaces (BaseTestCase): +class CommandsWithSpaces(BaseTestCase): def setUp(self): super().setUp() diff -r b66049748535 Lib/test/test_textwrap.py --- a/Lib/test/test_textwrap.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_textwrap.py Sat Jan 05 17:59:56 2013 +0200 @@ -259,7 +259,7 @@ self.check_split(text, expect) - def test_unix_options (self): + def test_unix_options(self): # Test that Unix-style command-line options are wrapped correctly. # Both Optik (OptionParser) and Docutils rely on this behaviour! @@ -293,7 +293,7 @@ "--dry-", "run", " ", "or", " ", "--dryrun"] self.check_split(text, expect) - def test_funky_hyphens (self): + def test_funky_hyphens(self): # Screwy edge cases cooked up by David Goodger. All reported # in SF bug #596434. self.check_split("what the--hey!", ["what", " ", "the", "--", "hey!"]) @@ -327,7 +327,7 @@ self.check_split("the ['wibble-wobble'] widget", ['the', ' ', "['wibble-", "wobble']", ' ', 'widget']) - def test_funky_parens (self): + def test_funky_parens(self): # Second part of SF bug #596434: long option strings inside # parentheses. self.check_split("foo (--option) bar", @@ -430,7 +430,7 @@ self.check_wrap(text, 7, ["aa \xe4\xe4-", "\xe4\xe4"]) -class LongWordTestCase (BaseTestCase): +class LongWordTestCase(BaseTestCase): def setUp(self): self.wrapper = TextWrapper() self.text = '''\ diff -r b66049748535 Lib/test/test_with.py --- a/Lib/test/test_with.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_with.py Sat Jan 05 17:59:56 2013 +0200 @@ -500,7 +500,7 @@ def testRaisedGeneratorExit2(self): # From bug 1462485 - class cm (object): + class cm(object): def __enter__(self): pass def __exit__(self, type, value, traceback): diff -r b66049748535 Lib/test/test_xmlrpc.py --- a/Lib/test/test_xmlrpc.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/test/test_xmlrpc.py Sat Jan 05 17:59:56 2013 +0200 @@ -95,7 +95,7 @@ self.assertIs(type(newdt), xmlrpclib.DateTime) self.assertIsNone(m) - def test_bug_1164912 (self): + def test_bug_1164912(self): d = xmlrpclib.DateTime() ((new_d,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((d,), methodresponse=True)) diff -r b66049748535 Lib/tkinter/filedialog.py --- a/Lib/tkinter/filedialog.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/tkinter/filedialog.py Sat Jan 05 17:59:56 2013 +0200 @@ -423,7 +423,7 @@ return open(filename, mode) return None -def askdirectory (**options): +def askdirectory(**options): "Ask for a directory, and return the file name" return Directory(**options).show() diff -r b66049748535 Lib/tkinter/tix.py --- a/Lib/tkinter/tix.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/tkinter/tix.py Sat Jan 05 17:59:56 2013 +0200 @@ -290,7 +290,7 @@ Both options are for use by subclasses only. """ - def __init__ (self, master=None, widgetName=None, + def __init__(self, master=None, widgetName=None, static_options=None, cnf={}, kw={}): # Merge keywords and dictionary arguments if kw: @@ -308,7 +308,7 @@ else: static_options = ['options'] - for k,v in list(cnf.items()): + for k, v in list(cnf.items()): if k in static_options: extra = extra + ('-' + k, v) del cnf[k] @@ -369,7 +369,7 @@ pass return retlist - def _subwidget_name(self,name): + def _subwidget_name(self, name): """Get a subwidget name (returns a String, not a Widget !)""" try: return self.tk.call(self._w, 'subwidget', name) @@ -493,7 +493,7 @@ elif not master: raise RuntimeError("Too early to create display style: no root window") self.tk = master.tk self.stylename = self.tk.call('tixDisplayStyle', itemtype, - *self._options(cnf,kw) ) + *self._options(cnf, kw) ) def __str__(self): return self.stylename @@ -511,16 +511,16 @@ def delete(self): self.tk.call(self.stylename, 'delete') - def __setitem__(self,key,value): + def __setitem__(self, key, value): self.tk.call(self.stylename, 'configure', '-%s'%key, value) def config(self, cnf={}, **kw): return _lst2dict( self.tk.split( self.tk.call( - self.stylename, 'configure', *self._options(cnf,kw)))) + self.stylename, 'configure', *self._options(cnf, kw)))) - def __getitem__(self,key): + def __getitem__(self, key): return self.tk.call(self.stylename, 'cget', '-%s'%key) @@ -588,7 +588,7 @@ cross Button : present if created with the fancy option""" # FIXME: It should inherit -superclass tixLabelWidget - def __init__ (self, master=None, cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixComboBox', ['editable', 'dropdown', 'fancy', 'options'], cnf, kw) @@ -632,7 +632,7 @@ label Label""" # FIXME: It should inherit -superclass tixLabelWidget - def __init__ (self, master=None, cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw) self.subwidget_list['incr'] = _dummyButton(self, 'incr') self.subwidget_list['decr'] = _dummyButton(self, 'decr') @@ -873,7 +873,7 @@ Subwidgets - None""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixHList', ['columns', 'options'], cnf, kw) @@ -1067,7 +1067,7 @@ Subwidgets - None""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw) class LabelEntry(TixWidget): @@ -1080,9 +1080,9 @@ label Label entry Entry""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixLabelEntry', - ['labelside','options'], cnf, kw) + ['labelside', 'options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') @@ -1097,9 +1097,9 @@ label Label frame Frame""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixLabelFrame', - ['labelside','options'], cnf, kw) + ['labelside', 'options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['frame'] = _dummyFrame(self, 'frame') @@ -1156,8 +1156,8 @@ nbframe NoteBookFrame page widgets added dynamically with the add method""" - def __init__ (self,master=None,cnf={}, **kw): - TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) + def __init__(self, master=None, cnf={}, **kw): + TixWidget.__init__(self, master, 'tixNoteBook', ['options'], cnf, kw) self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe', destroy_physically=0) @@ -1392,7 +1392,7 @@ Subwidgets - None""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixShell', ['options', 'title'], cnf, kw) class DialogShell(TixWidget): @@ -1404,7 +1404,7 @@ Subwidgets - None""" # FIXME: It should inherit from Shell - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDialogShell', ['options', 'title', 'mapped', @@ -1445,7 +1445,7 @@ Subwidgets - None""" - def __init__ (self,master=None,cnf={}, **kw): + def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixTList', ['options'], cnf, kw) def active_set(self, index): @@ -1683,7 +1683,7 @@ class _dummyComboBox(ComboBox, TixSubWidget): def __init__(self, master, name, destroy_physically=1): - TixSubWidget.__init__(self, master, name, ['fancy',destroy_physically]) + TixSubWidget.__init__(self, master, name, ['fancy', destroy_physically]) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') diff -r b66049748535 Lib/turtle.py --- a/Lib/turtle.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/turtle.py Sat Jan 05 17:59:56 2013 +0200 @@ -853,7 +853,7 @@ ############################################################################## -class Terminator (Exception): +class Terminator(Exception): """Will be raised in TurtleScreen.update, if _RUNNING becomes False. Thus stops execution of turtle graphics script. Main purpose: use in diff -r b66049748535 Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/xmlrpc/client.py Sat Jan 05 17:59:56 2013 +0200 @@ -525,7 +525,7 @@ f = self.dispatch["_arbitrary_instance"] f(self, value, write) - def dump_nil (self, value, write): + def dump_nil(self, value, write): if not self.allow_none: raise TypeError("cannot marshal None unless allow_none is enabled") write("") @@ -703,7 +703,7 @@ dispatch = {} - def end_nil (self, data): + def end_nil(self, data): self.append(None) self._value = 0 dispatch["nil"] = end_nil diff -r b66049748535 Lib/xmlrpc/server.py --- a/Lib/xmlrpc/server.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/xmlrpc/server.py Sat Jan 05 17:59:56 2013 +0200 @@ -542,7 +542,7 @@ self.send_header("Content-length", "0") self.end_headers() - def report_404 (self): + def report_404(self): # Report a 404 error self.send_response(404) response = b'No such page' diff -r b66049748535 Lib/zipfile.py --- a/Lib/zipfile.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Lib/zipfile.py Sat Jan 05 17:59:56 2013 +0200 @@ -279,7 +279,7 @@ return -class ZipInfo (object): +class ZipInfo(object): """Class with attributes describing each file in the ZIP archive.""" __slots__ = ( diff -r b66049748535 Tools/gdb/libpython.py --- a/Tools/gdb/libpython.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Tools/gdb/libpython.py Sat Jan 05 17:59:56 2013 +0200 @@ -1291,10 +1291,10 @@ class PyObjectPtrPrinter: "Prints a (PyObject*)" - def __init__ (self, gdbval): + def __init__(self, gdbval): self.gdbval = gdbval - def to_string (self): + def to_string(self): pyop = PyObjectPtr.from_pyobject_ptr(self.gdbval) if True: return pyop.get_truncated_repr(MAX_OUTPUT_LEN) @@ -1331,7 +1331,7 @@ /usr/lib/libpython2.6.so.1.0-gdb.py /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py """ -def register (obj): +def register(obj): if obj is None: obj = gdb diff -r b66049748535 Tools/scripts/get-remote-certificate.py --- a/Tools/scripts/get-remote-certificate.py Sat Jan 05 07:38:37 2013 +0200 +++ b/Tools/scripts/get-remote-certificate.py Sat Jan 05 17:59:56 2013 +0200 @@ -12,7 +12,7 @@ import tempfile -def fetch_server_certificate (host, port): +def fetch_server_certificate(host, port): def subproc(cmd): from subprocess import Popen, PIPE, STDOUT diff -r b66049748535 setup.py --- a/setup.py Sat Jan 05 07:38:37 2013 +0200 +++ b/setup.py Sat Jan 05 17:59:56 2013 +0200 @@ -2013,7 +2013,7 @@ # Suppress the warning about installation into the lib_dynload # directory, which is not in sys.path when running Python during # installation: - def initialize_options (self): + def initialize_options(self): install.initialize_options(self) self.warn_dir=0