News for hackers. Stuff that matters.
Re:Design Patterns in Python (Free Book) by beza1e1 on Wednesday December 28, 2011 @05:34AM (#3399323)
These are Java design patterns. Python has different patterns. That's why people say that Factory is natural in Python.

Two examples, what i consider (very simple) Python patterns (without fancy names though):

    if __name__ == "__main__":
      ...


    def MyDecorator(func):
      def wrapper(...):
        def my_func(*args, **vargs):
           ...
        return my_func
      return wrapper

There are no comments on this comment yet.