yegor256 / blog

My blog about computers, written in Jekyll and deployed to GitHub Pages
https://www.yegor256.com
Other
115 stars 62 forks source link

Update 2024-07-07-checking-object-existence.md #716

Closed blablatdinov closed 3 months ago

blablatdinov commented 3 months ago

Fix python code example.

https://docs.python.org/3/library/pathlib.html https://peps.python.org/pep-0519/ https://peps.python.org/pep-0428/

blablatdinov commented 3 months ago

@yegor256 take a look please

yegor256 commented 3 months ago

@blablatdinov to my knowledge, this is "new" Python. Maybe, we should keep two lines for Python: old and new?

blablatdinov commented 3 months ago

@yegor256 This class/object available from Python 3.4 . For jui 2024 all supported versions contain pathlib.Path.

If you disagree and want to present "old" and "new" methods I change file. Wait you opinion

Diagram of supported python versions: https://devguide.python.org/versions/

yegor256 commented 3 months ago

@blablatdinov currently, the link provided in the left column leads to a code that is different from what you suggest in the second column. let's make sure they are aligned. and let's show two rows: one for old style one for new. similar to how it's done for JDK

blablatdinov commented 3 months ago

@yegor256 Done, take a look

yegor256 commented 3 months ago

@blablatdinov thanks!

yegor256 commented 3 months ago

@rultor deploy

rultor commented 3 months ago

@rultor deploy

@yegor256 OK, I'll try to deploy now. You can check the progress here

rultor commented 3 months ago

@rultor deploy

@yegor256 Done! FYI, the full log is here (took me 24min)