T
2

Why does nobody talk about how long imports take to actually learn in Python?

I spent 3 hours last night debugging a script because I kept importing a module wrong. Turns out I was calling `from math import sqrt` but then trying to use `math.sqrt` later in the code. The error message was so vague that I just kept staring at my loop logic instead. Has anyone else wasted way too much time on something simple like import syntax?
2 comments

Log in to join the discussion

Log In
2 Comments
paul_webb45
Oh man, that's a classic trap. But actually the error message probably did point to a NameError, you might have just skimmed past it since you were focused on the loop.
5
oliver523
oliver52311d ago
paul_webb45 hit it on the head, but the real issue is way bigger than just Python. It's like when you're putting together furniture from IKEA and you spend an hour trying to force a screw into the wrong hole because the little diagram showed it from a weird angle. The whole system is built on small details that seem obvious after you figure them out, but nobody warns you about them upfront. Imports are the same way - everyone just says 'oh it's simple' but the first time you hit a circular import or a namespace collision it feels like the computer is gaslighting you. It's like learning to use a new coffee maker where the manual says 'insert filter' but doesn't tell you which side goes up. We all just get used to wasting that first hour being confused and then pretend it never happened.
2