Hi all! I just want to start off by saying that this isn’t a post to bash python or anything. I am just wondering if anyone has had a similar experience while learning python.

So, I also work in C++, and I have built a few projects with it. The thing about C++ is that it always feels like you know what to expect. If your code is correct and compiles, then odds are it’s going to do what you want it to.

Whereas, I have been learning python for a while now, and I often feel like it’s hard to predict what python is going to do. I feel like my code is right, and it runs. Then it spits out something completely wrong, and I have to start the process of finding what I did wrong. It feels like python is a black box sometimes, like it has so many features that hide incorrect code and allow it to run anyway. Has anyone else had this experience? How did you get past this and start writing better code?

edit: repetition

  • Ace! _SL/S@ani.social
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    I only feel like this when using libraries without type definitions/using bogus types like dict[str, Any] as EVERY fucking variable/return type without providing any docs