Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. 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")

Scheduled Pinned Locked Moved Uncategorized
python
3 Posts 3 Posters 1 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tamzin@wikis.worldT This user is from outside of this forum
    tamzin@wikis.worldT This user is from outside of this forum
    tamzin@wikis.world
    wrote last edited by
    #1

    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.

    #python

    davidr@hachyderm.ioD cazabon@mindly.socialC 2 Replies Last reply
    0
    • tamzin@wikis.worldT tamzin@wikis.world

      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.

      #python

      davidr@hachyderm.ioD This user is from outside of this forum
      davidr@hachyderm.ioD This user is from outside of this forum
      davidr@hachyderm.io
      wrote last edited by
      #2

      @tamzin Took me a minute to see it. That's hilarious. Maybe I'll start actually using pathlib just to entertain myself...

      1 Reply Last reply
      0
      • tamzin@wikis.worldT tamzin@wikis.world

        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.

        #python

        cazabon@mindly.socialC This user is from outside of this forum
        cazabon@mindly.socialC This user is from outside of this forum
        cazabon@mindly.social
        wrote last edited by
        #3

        @tamzin

        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 ๐Ÿ˜‰

        1 Reply Last reply
        1
        0
        • R relay@relay.mycrowd.ca shared this topic
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups