Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: Debugging (was Re: Why not allow empty code blocks?) Date: Thu, 4 Aug 2016 14:37:47 -0400 Lines: 34 Message-ID: References: <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> <57a0def4$0$1603$c3e8da3$5496439d@news.astraweb.com> <57a18490$0$1601$c3e8da3$5496439d@news.astraweb.com> <57a2b532$0$1597$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de iouiDW7j5UjPI152JYixiQEwCPG9EvuzZnqs2P0vN9og== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'apis': 0.07; 'subject:code': 0.07; 'scripts': 0.09; 'grep': 0.09; 'imports': 0.09; 'int)': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sane': 0.09; 'subject:Why': 0.09; 'python': 0.10; 'jan': 0.11; 'subject:not': 0.11; 'def': 0.13; 'apis.': 0.16; 'itertools': 0.16; 'languages)': 0.16; 'major,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:?)': 0.16; 'subject:allow': 0.16; 'skip:l 30': 0.18; 'test.': 0.18; 'tests': 0.18; 'parameter': 0.22; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'command': 0.26; 'header:X-Complaints-To:1': 0.26; 'question': 0.27; 'function': 0.28; 'code': 0.30; 'option': 0.31; 'skip:d 20': 0.34; 'widely': 0.35; 'there': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:org': 0.37; 'skip:p 20': 0.38; 'skip:o 20': 0.38; 'to:addr:python.org': 0.40; 'high': 0.60; 'making': 0.62; 'places': 0.64; 'repeat': 0.67; 'revealed': 0.72; 'break.': 0.84; 'repeat.': 0.84; 'proposal.': 0.93 X-Injected-Via-Gmane: http://gmane.org/ User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> <57a0def4$0$1603$c3e8da3$5496439d@news.astraweb.com> <57a18490$0$1601$c3e8da3$5496439d@news.astraweb.com> <57a2b532$0$1597$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:112341 Making repeat a keyword would have such an extremely high cost that it is out of the question and not a sane proposal. To start with, it is used in two major, widely used APIs. itertools.repeat + 50 uses in other itertools and tests + all the imports and and uses of repeat() in code all over the world. timeit command line option timeit.timeit(..., repeat=3) parameter name timeit.repeat() function + tests + all the scripts (some in other languages) using 'repeat' as a command line option and all the python code using the parameter or function. There are other C-coded public APIs that use repeat. One in xml.etree was revealed by the grep hit for the Python-coded test. Other places in the *Python-coded* stdlib that would break. distutils\fancy_getopt.py: 141: self.repeat = {} lib2to3\fixes\fix_operator.py: 8: operator.repeat(obj, n) ... lib2to3\patcomp.py: 105: repeat = None lib2to3\patcomp.py: 139: def compile_basic(self, nodes, repeat=None): lib2to3\tests\test_fixers.py: 4494: b = "operator.repeat(x, n)" test\test_faulthandler.py: 533: repeat = {repeat} test\test_faulthandler.py: 539: def func(timeout, repeat, ... test\test_xml_etree.py: 1784: for dumper, loader in product(self.modules, repeat=2): typing.py: 373: def repeat(x: T, n: int) -> Sequence[T]: -- Terry Jan Reedy