r/learnpython • • Aug 30 '26

What is the secret sauce for importing a class from another file in the same directory?

1 Upvotes

I'm not even throwing out code that doesn't work here because I've been dredging from sample and trying every conceivable (evidently not) permutation of the items.

All I am trying to do is to import a class from one file into another. What's the secret here? I keep getting variations on "ImportError: cannot import name 'theFormView' from 'formView'"

This is so fundamental that I'm having trouble getting a single clear answer. Can someone please help me to clear this up?

Thanks.


r/learnpython • • Aug 30 '26

do i need to know undergrad level maths to start hands on machine learning with pytorch?

8 Upvotes

is highschool maths enough?or i could simultaneously learn maths behind while reading book?