Skip to content Skip to sidebar Skip to footer
Showing posts with the label Design Patterns

Switch-case In Python Doesn't Work; Need Another Pattern

I need a help with some code here. I wanted to implement the switch case pattern in Python, so like… Read more Switch-case In Python Doesn't Work; Need Another Pattern

Can The Main Loop Of A Program Be Moved Out Of Gui?

I'm using python 3 / tkinter if that matters. In looking at code samples I noticed that the mai… Read more Can The Main Loop Of A Program Be Moved Out Of Gui?

How To Avoid Excessive Parameter Passing?

I am developing a medium size program in python spread across 5 modules. The program accepts comman… Read more How To Avoid Excessive Parameter Passing?

How Could A Mixin Or Factory Look Like Using Modern Python 3?

Imagine, we have a some files: scheme.py scheme.One.py scheme.Two.py sceme.*.py ... In file '… Read more How Could A Mixin Or Factory Look Like Using Modern Python 3?

Calling Chains Methods With Intermediate Results

I have a class and some methods of it. Could I keep a result of the methods between calling. Examp… Read more Calling Chains Methods With Intermediate Results

Is The Visitor Pattern Useful For Dynamically Typed Languages?

The Visitor pattern allows operations on objects to be written without extending the object class. … Read more Is The Visitor Pattern Useful For Dynamically Typed Languages?