[Tutor] seeking design pattern

bob gailer bgailer at gmail.com
Sun Aug 25 09:14:07 EDT 2019


On 8/24/2019 9:47 PM, Cameron Simpson wrote:
>
> Can you describe why you would want the original behaviour you describe?
>
> Bear in mind that most Python names can be rebound. So you can rebind 
> "print" to a function of your own choosing. Should a() also honour that?
>
> Try to provide something you want to do in the real world which would 
> benefit from this name behaviour.

Thanks for your reply. My associate and I are co-authoring a project. I 
am developing the main program; he is writing arduino drivers.

In the main program I have several functions (e.g. log()) that are 
called from main program code and from the arduino drivers.

to keep a clean separation of code his drivers are in a separate module 
that is imported by the main program. So we have a need to access some 
of the functions I've written from both my code and his, which reside in 
2 different modules.

-- 
Bob Gailer



More information about the Tutor mailing list