/Programming-Collective-Intelligence

Examples from Programming Collective Intelligence

Primary LanguagePython

#######################################

Programming Collective Intelligence

#######################################

Examples from Programming Collective Intelligence

Code was "tidied" up using PythonTidy with the following settings:

COL_LIMIT = 80
INDENTATION = '    '
ASSIGNMENT = ' = '
FUNCTION_PARAM_ASSIGNMENT = '='
FUNCTION_PARAM_SEP = ', '
LIST_SEP = ', '
SUBSCRIPT_SEP = ', '
DICT_COLON = ': '
SLICE_COLON = ':'
COMMENT_PREFIX = '# '  # 2007 May 25
SHEBANG = '#!/usr/bin/python'
CODING = 'utf-8'
CODING_SPEC = '# -*- coding: %s -*-' % CODING
BOILERPLATE = NULL  # 2007 Mar 06
BLANK_LINE = NULL
KEEP_BLANK_LINES = False
ADD_BLANK_LINES_AROUND_COMMENTS = False
MAX_SEPS_FUNC_DEF = 3  # 2007 May 24
MAX_SEPS_FUNC_REF = 5  # 2007 May 24
MAX_SEPS_SERIES = 5  # 2007 May 24
MAX_SEPS_DICT = 3  # 2007 May 24
MAX_LINES_BEFORE_SPLIT_LIT = 2
LEFT_MARGIN = NULL
LEFTJUST_DOC_STRINGS = False
WRAP_DOC_STRINGS = False  # 2007 May 25
DOUBLE_QUOTED_STRINGS = False  # 2006 Dec 05
SINGLE_QUOTED_STRINGS = False  # 2007 May 01
RECODE_STRINGS = False  # 2006 Dec 01
OVERRIDE_NEWLINE = None  # 2012 Mar 04
CAN_SPLIT_STRINGS = False  # 2007 Mar 06
DOC_TAB_REPLACEMENT = '....'  # 2007 May 24
KEEP_UNASSIGNED_CONSTANTS = False  # 2010 Mar 10
PARENTHESIZE_TUPLE_DISPLAY = True  # 2010 Mar 10
JAVA_STYLE_LIST_DEDENT = True  # 2010 Sep 08