<br><br><div><span class="gmail_quote">On 7 Apr 2007 13:19:06 -0700, <b class="gmail_sendername">Gabriel Genellina</b> <<a href="mailto:gagsl-py2@yahoo.com.ar">gagsl-py2@yahoo.com.ar</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Joel Andres Granados wrote:<br><br>> The module also allows the comments to appear in the same line as the<br>> "name = value" constructs.  The only difference being that this is only<br>> possible with ";" and not with "#" character.  I did not see this in the
<br>> documentation but this is how it is behaving.<br><br>Yes, it's not documented. There is only a comment in the source code:<br><br>                            # ';' is a comment delimiter only if it<br>
follows<br>                            # a spacing character<br><br>I think it's either a bug in the code or in the documentation.</blockquote><div><br>Yep, IMO its a weirdness in the behavior that is not documented. 
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> QUESTION...So the question is:<br>> Can you use "#" and ";" as comment characters? and if so why does the
<br>> "#" not apply for the same situations as the ";"?<br><br>If you follow the documentation, comments are ONLY allowed to start a<br>line.<br>The actual implementation discards any text following a <space>;
<br>sequence.</blockquote><div><br>Yep.   This is just one of the situations where the documentation is different from the actual behavior.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Just for reference:<br>> On the RFC 822 <<a href="http://www.faqs.org/rfcs/rfc822.html">http://www.faqs.org/rfcs/rfc822.html</a>> (a document<br>> referenced in the documentation) there is a mention of ";" being used as
<br>> comment character but not necessarily at the beginning of the line.<br><br>RFC822 uses ";" to include comments in the syntax rules, not for<br>comments in the actual message headers (parenthesis are used there).
</blockquote><div><br>Yep.  Here I just wanted to stress that in the RFC it states that the comment doesn't necessarily have to be at the beginning of the line.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
--<br>Gabriel Genellina<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br><br clear="all"><br>-- <br>Joel Andrés Granados
<br>Medellín Colombia<br>--<br><a href="mailto:jgranad1@eafit.edu.co">jgranad1@eafit.edu.co</a><br><a href="mailto:joel.granados@ieee.org">joel.granados@ieee.org</a>