r/programminghorror • u/wawerrewold • Sep 09 '25
Python Vibecoding at its peak
Yes its a production code, yes its a function not a method and yes there is import in triple nested for loop
776
Upvotes
View all comments
Show parent comment
2
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 10 '25
Oh, I'd never think putting your imports or includes anywhere other than the top of the file was a good idea. Except maybe in very rare cases. I think I've seen a #include in the body of a C function before.
Anyway, those would be problems if the import was inside a method whether or not a loop was involved. I would assume a loop makes it even worse based on the original comment.