I've never seen a feature in a programming language as simultaneously intuitive, counterintuitive, clever, stupid, and useful as: from pathlib import Path; print(Path("foo") / "bar")
-
I've never seen a feature in a programming language as simultaneously intuitive, counterintuitive, clever, stupid, and useful as: from pathlib import Path; print(Path("foo") / "bar")
Like I hate that this exists and I will use it from now on now that I know it does.
-
I've never seen a feature in a programming language as simultaneously intuitive, counterintuitive, clever, stupid, and useful as: from pathlib import Path; print(Path("foo") / "bar")
Like I hate that this exists and I will use it from now on now that I know it does.
@tamzin Took me a minute to see it. That's hilarious. Maybe I'll start actually using pathlib just to entertain myself...
-
I've never seen a feature in a programming language as simultaneously intuitive, counterintuitive, clever, stupid, and useful as: from pathlib import Path; print(Path("foo") / "bar")
Like I hate that this exists and I will use it from now on now that I know it does.
pathlib's Path class is fantastic - but the "cute" overload of the division operator for this kind of annoys me, now. It sure grabs your attention when you first see it, but I don't know why - it started bugging me.
It's nice to know I'm not the only one with mixed feelings about it.
Still use it, of course

-
R relay@relay.mycrowd.ca shared this topic