[Python-ideas] Rewriting file - pythonic way

Paul Moore p.f.moore at gmail.com
Sun Apr 15 06:39:12 EDT 2018


On 15 April 2018 at 10:49, Alexey Shrub <ashrub at yandex.ru> wrote:
> В Воскресенье, 15 апр. 2018 в 12:40 , Serhiy Storchaka <storchaka at gmail.com>
> написал:
>>
>> If the problem is that you want to use a single line instead of three
>> line, you can add a function
>
>
> Yes, I think that single line with word 'rewrite' is much more readable than
> those three lines.
> And yes, I can make my own function, but it is typical task - maybe it must
> be in standard library?

I don't think it's *that* typical. I don't recall even having wanted
to do this in all the time I've been using Python...
Paul


More information about the Python-ideas mailing list