[EMAIL PROTECTED] writes:

> Hi python experts
> 
> In C++ I can do something like this:
> class Base {
>   public:
>     void f() { this->f_(); }
>   private:
>     virtual void f_() = 0;
> };
> 
> class Derived : public Base {
>   private:
>     void f_() { // Do something }
> };
> 
> int main() {
>     Derived d;
>     d.f();
> }
[...]

The others have already answered the Python question and pointed out
this isn't really the Strategy Pattern.

Still, these slides from Alex Martelli specifically on the Template
Method DP in Python are probably very relevant to you:

http://www.aleax.it/Python/os03_template_dp.pdf


John
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to