Python: Is function passing more detailed?

I have two or more threads (created by subclassing threading.Thread) that work in parallel, and they often communicate with each other. They communicate by calling each other's methods. Since I do this, I have every thread that passes itself as an argument, so that all class attributes are available immediately.

This is probably a lazy way to do it, since I could determine what attributes the method should know, and only pass them. So my question is passing an instance of an entire class to a method that is less efficient than just the relevant data?

+3
source share
2 answers

, - , , . - , .

+6

Python . , , .

, , .

+1

All Articles