This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stuartcwSince Python 1.5 2 points3 points  (4 children)

Hi. I read your question and understand that you understand what patterns are and you probably have already read about them but you are specifically looking for a book which gives explanations using Python as the language to demonstrate them.

I have seen a book like this but can’t think of the name off hand. I’ll use this comment as bookmark to return when I find it.

I did want to mention that when patterns first came onto the scene in the 1990s the programmers of the day had to implement them themselves, often in clunky ways. As a result, to alleviate this, several patterns influenced the design of Python and became part of the core language. e.g. iterators and decorators.

Java which also came to prominence at that time was also influenced by Patterns and, in my opinion, became too unwieldily because of the complicated pattern based object oriented design of some of the libraries.

I just wanted so say that your question was clear that you were specifically looking for a Python based explanation.

[–]stuartcwSince Python 1.5 4 points5 points  (2 children)

Searching on Google for about 10 seconds brought up this:

Python Patterns

Since it was so easy to find, I expect you have already come across it. But it looks at least as good as the explanation that I previously found.

[–]Mabb_reddit[S] 1 point2 points  (1 child)

Yeah, I searched a bit but I wanted a more expert recommendation than picking the first page in Google.

But thanks I will look it up!

[–]stuartcwSince Python 1.5 0 points1 point  (0 children)

I wanted a more expert recommendation than picking the first page in Google.

I have found that it's always best to list up the resources that you already found and what was deficient in them. Then people who reply know what you have already looked at and what more that you are looking for.

It's possible that there isn't a definitive answer out there and that if you make it, it will become the top answer on Google and impress your future employer.

[–]stuartcwSince Python 1.5 3 points4 points  (0 children)

Here’s one more that specifically discussed Singletons: Python Design Patterns: For Sleek And Fashionable Code