[EMAIL PROTECTED] wrote: > I am new to python language and most of my python programming has been > done with IronPython. > > I was looking at the source of markupbase.py which is included with > Python 2.4 and came across the following line of code:- > > if rawdata[j:j+1] == '--': #comment > > i was confused because based on my understanding of the slicing syntax, > rawdata[j:j+1] will either yield a string with ONE character or an > empty string, therefore this boolean comparison will always be False > because we are checking if it will be equal to a string with 2 > characters! > > am I missing something here ?
nope. it's a bug, and it's fixed in 2.5 alpha, so there's no need to report it. </F> -- http://mail.python.org/mailman/listinfo/python-list