"Peter J. Holzer" writes:
> On 2021-08-29 10:04:47 +0100, Barry wrote:
>> > I'd like get a statistic of how often each loop is used in practice.
>> >
>> > I was trying to take a look at the Python's standard libraries --- those
>> > included in a standard installation of Python 3.9.6, say ---
On 2021-08-29 10:04:47 +0100, Barry wrote:
> > I'd like get a statistic of how often each loop is used in practice.
> >
> > I was trying to take a look at the Python's standard libraries --- those
> > included in a standard installation of Python 3.9.6, say --- to see
> > which loops are more of
Terry Reedy writes:
> On 8/28/2021 9:31 AM, Hope Rouselle wrote:
>> I'd like get a statistic of how often each loop is used in practice.
>
> My guess is that for loops are at least twice as common as while loops.
Scanning just the Python 3.9.6's Lib/ directory --- using the ast module
and the pr
Chris Angelico writes:
> On Sun, Aug 29, 2021 at 7:40 AM Hope Rouselle wrote:
>>
>> I'd like get a statistic of how often each loop is used in practice.
>>
>> I was trying to take a look at the Python's standard libraries --- those
>> included in a standard installation of Python 3.9.6, say ---
Barry writes:
>> On 28 Aug 2021, at 22:42, Hope Rouselle wrote:
>>
>> I'd like get a statistic of how often each loop is used in practice.
>>
>> I was trying to take a look at the Python's standard libraries --- those
>> included in a standard installation of Python 3.9.6, say --- to see
>>
> On 28 Aug 2021, at 22:42, Hope Rouselle wrote:
>
> I'd like get a statistic of how often each loop is used in practice.
>
> I was trying to take a look at the Python's standard libraries --- those
> included in a standard installation of Python 3.9.6, say --- to see
> which loops are mor
On Sun, 29 Aug 2021 at 00:04, Stefan Ram wrote:
> Stestagg writes:
> >If you're doing this analysis, I'd be pretty interested in how many of
> >those while loops where 'while True:'
>
> Here, about 40 %.
Thanks! That's an interesting stat. I might have to look more into how
while loops ar
On 8/28/2021 9:31 AM, Hope Rouselle wrote:
I'd like get a statistic of how often each loop is used in practice.
My guess is that for loops are at least twice as common as while loops.
I was trying to take a look at the Python's standard libraries --- those
included in a standard installation
If you're doing this analysis, I'd be pretty interested in how many of
those while loops where 'while True:'
I'd wager 75%. But may be completely off
Steve
On Sat, 28 Aug 2021 at 23:03, Hope Rouselle wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>
> > Hope Rouselle writes:
> >>Have y
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Hope Rouselle writes:
>>Have you guys ever measured something like that in a casual or serious
>
> import ast
> import pathlib
> rootname=r''
> rootpath=pathlib.Path(rootname)
> rootiterable=rootpath.glob('**/*.py')
> first = True
> WhileCount =
On Sun, Aug 29, 2021 at 7:40 AM Hope Rouselle wrote:
>
> I'd like get a statistic of how often each loop is used in practice.
>
> I was trying to take a look at the Python's standard libraries --- those
> included in a standard installation of Python 3.9.6, say --- to see
> which loops are more of
I'd like get a statistic of how often each loop is used in practice.
I was trying to take a look at the Python's standard libraries --- those
included in a standard installation of Python 3.9.6, say --- to see
which loops are more often used among while and for loops. Of course,
since English u
12 matches
Mail list logo