Debugging (was Re: Why not allow empty code blocks?)

BartC bc at freeuk.com
Tue Aug 2 13:12:14 EDT 2016


On 02/08/2016 15:58, Chris Angelico wrote:
> On Tue, Aug 2, 2016 at 9:05 PM, BartC <bc at freeuk.com> wrote:
>> I think the real reason is not willing to admit that the language lacks
>> something that could actually be useful, and especially not to an upstart on
>> usenet who is not even an expert in that language.
>
> I know what features I miss from the languages I use most frequently.
> Here, let me help you out a bit with some examples:
>
> Python
> - Support for live code reloads without restarting the process

If that means what I think it means (ie. effectively re-doing an import 
statement) then I agree.

I think I used a similar feature in the past, but with limitations (the 
module had one only entry point accessible from the code that imports it).

It was used for developing much of an application not only without 
restarting it, but from inside the application (effectively using it as 
an IDE). Very, very useful.

> that I didn't put "simpler loop syntax" in either; Python's loops you
> know about, and Pike gives you the C-style "for (int i=0; i<10; ++i)"

You've just hit on another bugbear of mine. I detest that form of loop!

> Does Python "lack" the simple repeat statement? Well, in the sense
> that it doesn't have it, sure. But Python also doesn't have a single
> function to read a line from a gzipped file and strip HTML tags from
> it before returning it [1]. Not everything that doesn't exist is
> needed.

That's not a fundamental language feature. Repeat-N is. And if properly 
designed, isn't an extra feature at all but a special case of a generic 
loop.

-- 
Bartc



More information about the Python-list mailing list