How to avoid excessive parameter passing?

后端 未结 6 845
予麋鹿
予麋鹿 2021-02-11 00:22

I am developing a medium size program in python spread across 5 modules. The program accepts command line arguments using OptionParser in the main module e.g. main.py. These opt

6条回答
  •  不思量自难忘°
    2021-02-11 00:57

    Your example is reminiscent of the code smell Message Chains. You may find the corresponding refactoring, Hide Delegate, informative.

提交回复
热议问题