[Pywikipedia-l] Two minor problems in replace.py (attn xqt)
wikiposta at gmail.com
Fri Feb 25 18:39:01 UTC 2011
Thanks you both!
2011/2/25 Merlijn van Deen <valhallasw at arctus.nl>
> Of course, the
> >>> 'a' if append else 'w'
> is nicer, but has only been supported for python 2.5+.
This is my personal favourite, and I really would be glad to see 2.4 in the
museum (together with all 2.x :-D)
> An alternative, third, method, would be
> >>> append = True
> >>> ['w', 'a'][append]
This is great, I would never have thought of that myself! I learned
something interesting today.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pywikipedia-l