Hello xqt and valhallasw!
Just wanted to give a final comment to this topic. ;)
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-11-06 04:17
Message: KeyError fixed in r8701 as recommended
Maybe there are follow-ups of this bug in other scripts depending of the comment is None ----------------------------------------------------------------------
THANKS A LOT FOR IMPLEMENTING THIS!
---------------------------------------------------------------------- Comment By: Merlijn S. van Deen (valhallasw) Date: 2010-11-04 14:44
Message: I disagree with the statement "an unicode string is expected and thus a None (..) is not a good idea". The comment is hidden, which is different from an empty comment. Using None is much more sensible.
In addition, the code can be simplified by using contrib.get('comment', None) instead of the current if/the. ----------------------------------------------------------------------
YEA, I WAS NOT SURE WHICH ONE TO CHOOSE. 'None' SEAMS MORE SENSIBLE SOLUTION, BUT SINCE I WANTED NOT TO BREAK OTHER CODE... ;) INDEED, THE SIMPLIFIED CODE IS A LOT BETTER - I WAS FOCUSSED ON TRIGGERING TO 'commenthidden' WHICH IS NOT REALLY NEEDED. AFTER ALL WHEN I WAS LOOKING AT THE CODE THE 'None' GETS FED INTO A PAGE OBJECTS, SO THIS IS THE ONLY PART THAT COULD BREAK, AND SHOULD NOT AFFECT ANY OTHER CODE... SEAMS THE PERFECT SOLUTION.
Greetings and thanks Dr. Trigon
pywikipedia-l@lists.wikimedia.org