16
DAE get stuck on a project for days only to fix it with one line of code?
I was trying to make a list of numbers in Python for a small game, but it kept giving me an error about 'NoneType' every time I ran it. After three days of checking everything, I realized I was using .append() wrong by printing the result instead of just calling it. Has anyone else had a simple mistake like this that blocked them for way too long?
2 comments
Log in to join the discussion
Log In2 Comments
young.emma1d ago
Is it really a big deal though?
5
lucas1651d ago
Oh man, the number of hours I've lost to stuff like that is embarrassing. Once spent a whole weekend debugging a function that always returned zero. Turns out I had a variable inside the function named the same as one outside, and I was just reading the global one by mistake. Felt like a total genius when I finally saw it.
1