Thanks you both!<br><br><div class="gmail_quote">2011/2/25 Merlijn van Deen <span dir="ltr"><<a href="mailto:valhallasw@arctus.nl">valhallasw@arctus.nl</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><br><div>Of course, the</div><div>>>> 'a' if append else 'w'</div>
<div><br></div><div>is nicer, but has only been supported for python 2.5+.</div></div></blockquote><div>This is my personal favourite, and I really would be glad to see 2.4 in the museum (together with all 2.x :-D)<br> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div><br></div><div>An alternative, third, method, would be</div><div>
<br></div><div>>>> append = True</div><div>>>> ['w', 'a'][append]</div>
<div>'a'</div></div></blockquote><div>This is great, I would never have thought of that myself! I learned something interesting today.<br><br></div></div><br>-- <br>Bináris<br>