[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-02-05 Thread Keelung Yang
Keelung Yang added the comment: OK. Since most are opposed to append kwarg, I close this issue. Thanks ALL! -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-29 Thread Keelung Yang
Keelung Yang added the comment: Without append kwarg, users need two lines to append. It's bad to both readability and writability. Library developers should focus on bath language and library's design targets, but how frequently used. And as all discussed here, at least one ap

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-28 Thread Keelung Yang
Keelung Yang added the comment: In file operations, write/modify/append, which one is generic/common? They're all. Modifying need more then one line code, but write/oppend needn't. Two lines are bad to readability and readability counts. How do you determine it's no

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-28 Thread Keelung Yang
Keelung Yang added the comment: This shouldn't be limited logging. In unstable application scene, file should be append and then close immediately to avoid breaking filesystem (e.g. inode is not updated timely). Such as main.py file in MicroPython development board, user may disconnec

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
Keelung Yang added the comment: @barneygale, This is for simplifying code and improve readability, since `Readability counts` in The Zen of Python. Users needn't two lines code to append a file. And there is a minimal modifying to reach it. If inexperienced users are falling into the

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
Change by Keelung Yang : -- components: +Library (Lib) type: -> enhancement versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issu

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
New submission from Keelung Yang : Three reasons to improve issue 35095: Implement pathlib.Path.append_bytes and pathlib.Path.append_text 1. If I want to append text to log at each startup(before calling basicConfig), there is no simple way to do this. 2. Adding append keyword is better

[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2022-01-24 Thread Keelung Yang
Keelung Yang added the comment: @pitrou Firstly, I can't agree with `it is quite uncommon to open a file in append mode`. It should be depended to users and their application scenes. @pablogsal Secondly, I think `Path.write_*(, append=False)` is better then adding new APIs, as discuss

[issue35228] Index search in CHM help crashes viewer

2020-05-31 Thread Keelung Yang
Keelung Yang added the comment: It's reoccurable in Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on windows version 10.0.19041.264 Just need to open "Python 3.8 Manuals (64-bit)" --> index --> input 'p' on keyboard.