<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 13 February 2014 08:34, Ned Batchelder <span dir="ltr"><<a href="mailto:ned@nedbatchelder.com" target="_blank">ned@nedbatchelder.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 2/12/14 12:50 PM, Asaf Las wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wednesday, February 12, 2014 7:48:51 AM UTC+2, Dave Angel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Perhaps if you would state your actual goal,  we could judge<br>
  whether this code is an effective way to accomplish<br>
  it.<br>
DaveA<br>
</blockquote>
<br>
Thanks!<br>
<br>
There is no specific goal, i am in process of building pattern knowledge<br>
in python by doing some examples.<br>
<br>
</blockquote>
<br></div>
Not all patterns are useful.  Just because it's been enshrined in the GoF patterns book doesn't mean that it's good for Python.<br></blockquote><div><br></div><div>Speaking of which, my monitor is currently sitting on my copy of "Design Patterns".</div>
<div><br></div><div>A lot of "Design Patterns" isn't directly relevant to Python, because Python either already has various patterns implemented, or obviates the need for them. For example, if you really need a singleton (answer - you don't) just use a module attribute. Functions as objects and iterators being so pervasive means that visitor and related patterns are just a normal style of programming, instead of having to be explicit.</div>
<div><br></div><div>Tim Delaney <br></div></div></div></div>