Python classes in multiple files - do all methods need to be imported into class definition?

44 views Asked by At

I've started splitting a class among into several files/folders and have found that there are functions that are only needed to organize code and would never be called by anything higher-up in the class hierarchy (much less by the user). Is there someway I can import these into just the functions they're needed in rather than needing to import them into the class definition?

I'm getting a bit annoyed in my testing of getting the AttributeError: 'MyClass' object has no attribute 'my_low_level_function'?

0

There are 0 answers