From: Dustin L. <qh...@gm...> - 2011-07-28 15:30:00
|
Thanks for the tip. Since this is essentially a one character fix I'm guessing this will be sufficient for now but if you think it will help I can re-run the diff with -u. dustin On Mon, Jul 25, 2011 at 4:56 PM, Barry Scott <ba...@ba...> wrote: > On 15 Apr 2011, at 21:13, Dustin Lee wrote: > > > Here is the use case and a fix for this error. Let me know if there is a > more efficient way to present this. > > > > groucho:~/projects/python/pychecker/pychecker-0.8.19 > > $ cat ../test_checkbuiltins.py > > def foo_func(): > > s = "foo" > > return '%s' % s.center(1) > > > > groucho:~/projects/python/pychecker/pychecker-0.8.19 > > $ python pychecker/checker.py ../test_checkbuiltins.py > > Processing module test_checkbuiltins (../test_checkbuiltins.py)... > > > > Warnings... > > > > ../test_checkbuiltins.py:3: INTERNAL ERROR -- STOPPED PROCESSING FUNCTION > -- > > Traceback (most recent call last): > > File "pychecker/warn.py", line 242, in _checkFunction > > _checkCode(code, codeSource) > > File "pychecker/warn.py", line 153, in _checkCode > > dispatch_func(oparg, operand, codeSource, code) > > File "pychecker/CodeChecks.py", line 1690, in _CALL_FUNCTION > > _handleFunctionCall(codeSource, code, oparg) > > File "pychecker/CodeChecks.py", line 474, in > _handleFunctionCall > > check_arg_count) > > File "pychecker/CodeChecks.py", line 256, in _checkBuiltin > > methodInfo[1], methodInfo[2]) > > IndexError: tuple index out of range > > > > groucho:~/projects/python/pychecker/pychecker-0.8.19 > > $ diff -p pychecker/python.py > ../pychecker-0.8.19-FIXED/pychecker/python.py > > *** pychecker/python.py 2011-01-06 15:59:52.000000000 -0700 > > --- ../pychecker-0.8.19-FIXED/pychecker/python.py 2011-04-15 > 13:59:18.000000000 -0600 > > *************** if utils.pythonVersion() >= utils.PYTHON > > *** 165,173 **** > > > > if utils.pythonVersion() >= utils.PYTHON_2_4: > > _STRING_METHODS['rsplit'] = (types.StringType, 0, 2) > > ! _STRING_METHODS['center'] = (types.StringType, 1, 2), > > ! _STRING_METHODS['ljust'] = (types.StringType, 1, 2), > > ! _STRING_METHODS['rjust'] = (types.StringType, 1, 2), > > > > BUILTIN_METHODS = { types.DictType : > > { 'clear': (types.NoneType, 0, 0), > > --- 165,173 ---- > > > > if utils.pythonVersion() >= utils.PYTHON_2_4: > > _STRING_METHODS['rsplit'] = (types.StringType, 0, 2) > > ! _STRING_METHODS['center'] = (types.StringType, 1, 2) > > ! _STRING_METHODS['ljust'] = (types.StringType, 1, 2) > > ! _STRING_METHODS['rjust'] = (types.StringType, 1, 2) > > > > BUILTIN_METHODS = { types.DictType : > > { 'clear': (types.NoneType, 0, 0), > > > > Its preferred to use diff -u to submit patches as its easier to > review them. > > Barry > > > > > > -- > > Dustin Lee > > qhfgva=rot13(dustin) > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and > improve > > application availability and disaster protection. Learn more about > boosting > > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev_______________________________________________ > > PyChecker-list mailing list > > PyC...@li... > > https://lists.sourceforge.net/lists/listinfo/pychecker-list > > -- Dustin Lee qhfgva=rot13(dustin) |