Skip to main content
7 events
when toggle format what by license comment
Aug 30, 2024 at 19:51 comment added Doc Brown @user3067860: the "what is this called" has already a good answer, there is no point in repeating that again. And I am sure readers can decide by themselve whether my suggestion to make the code suitable for automated tests fits to their context or not.
Aug 30, 2024 at 15:11 comment added user3067860 I don't think the implementation suggestions add anything to "what is this called" and besides that completely miss the nuance of what are you actually doing. If someone told me they were writing unit tests for a one-off script cleaning up some files on their workstation I would be questioning if they don't have enough real work to do. If they told me they were implementing a user facing application which would delete user documents and they weren't planning to include UI showing what would be deleted ahead of time I would be removing their commit privileges from the repository.
Aug 28, 2024 at 23:48 comment added Alexander The 1st @chepner: I agree with that, as it would allow the dry run to confirm that the delete_funct(file_path, log_files) call itself knows what the file path it will be deleting, and doing additional details like, perhaps, figuring out from what current working directory it would be trying to delete the file from.
Aug 28, 2024 at 14:47 history edited Doc Brown CC BY-SA 4.0
added 189 characters in body
Aug 28, 2024 at 14:18 history edited Doc Brown CC BY-SA 4.0
added 404 characters in body
Aug 28, 2024 at 13:37 comment added chepner Rather than a Boolean flag, make delete itself a parameter that can take a log function instead of an actual file-deletion function.
Aug 28, 2024 at 13:25 history answered Doc Brown CC BY-SA 4.0