Elektrine lite

← Feed

@treyhunner@mastodon.social

Post #1065473

2026-04-09 19:10 UTC

Python Tip #99 (of 365): Don't convert pathlib.Path objects to strings Using a pathlib.Path object in an f-string or a print call is fine and I do this often. But if you THINK you need to convert a pathlib.Path object to a string to pass it off to some other path-handling utility, you probably don't need to. Most path-handling utilities in Python support pathlib.Path objects just fine. #Python #DailyPythonTip

Replies (0)

No replies.