I knew what this module is for, I just don't know why they choose this name - shutil. It is hard to remember this kind of "random" name if I don't know where it come from. Please give me some hints, thanks.
what does shutil (in Python) mean? [closed]
Asked Answered
It means "shell utilities", sh standing for shell, util standing for utilities.
If you think about what shutil does, that makes sense (manipulate the filesystem, make archives, etc.).
Maybe the module could have been named sh_utils to make it more clear. @Rafe Good and clear explanation –
Polaris
@KornP that wouldn't fit with typical naming conventions for modules. –
Leighannleighland
Well, yes and no. This is what I read in PEP8 regarding module names: "Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability." But it is not that important. –
Polaris
@KornP not so much based on PEP8 but based on the way that modules in the standard library are named. But yes, you are correct. –
Leighannleighland
© 2022 - 2024 — McMap. All rights reserved.