a function retaining data looks clear to me. if there are 2 function that need to share or exchange data, they can be made in the same module and that would do it. OTOH, when i try to think of a use case for data sharing/exchanging, i end up with an idea that would be done better in a class, such as a queued buffer. potential users might need more than one. while that can still be done with just some functions exchanging retained data in a module, layered with a container like a dictionary, a class makes it simpler because the design expression is just for one instance of the many instead of having all that indexing in the code (BTDT in C and assembler).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.