• 0 Posts
  • 287 Comments
Joined 1 year ago
cake
Cake day: September 13th, 2023

help-circle
  • Because to a certain extent Python is duck typed. Python has no concept of interfaces, unless you count the abc module combined with manual isinstance() checks, which I’ve never seen anyone do in production. In order to be passed to some function that expects a “file-like object”, it just has to have methods named read(), seek(), and possibly isatty(). The Python philosophy, at least as I see it, is “as long as it has methods named walk() and quack(), it’s close enough to a duck for me to treat it as one”.

    Duck typing is distinct from weak type systems, though.










  • AVincentInSpace@pawb.socialtoKDE@lemmy.kde.socialKde laptop
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months ago

    I cannot recommend Framework laptops enough. I recently got my hands on one and it’s the best laptop I’ve ever owned. It of course runs Linux like a dream. Everything works out of the box. No proprietary blobs needed for any of its hardware drivers, of course, plus the firmware for the embedded controller as well as the keyboard are open source and can be reflashed from the device (the keyboard firmware is even a fork of QMK). Its 165Hz 1440p 16:10 monitor being driven by a Radeon 7700S makes it one of the best laptop gaming experiences I’ve had, which is especially impressive considering it’s not marketed as a gaming laptop. Three hours battery life with the dGPU installed is the best I’ve seen out of a gaming laptop ever, and if you pull out the GPU and run off integrated graphics, the battery life doubles to a very respectable six hours for web browsing.

    There’s also of course the obvious customization aspect. Don’t like which I/O ports are on the side? Swap in a different module! You don’t even have to reboot your computer. Want your trackpad to be centered or off to the side to make room for a numpad? Move it around! You don’t even have to reboot your computer. Who needs Nvidia Optimus when you can physically remove the GPU from the laptop, reducing power savings even more and making the laptop several pounds lighter to boot? (You do have to shut down to do that, and swapping it out takes around five minutes, but still.)

    I know this post sounds like it was sponsored but it wasn’t. I just really love this thing ^-^