How do I handle #

Michael Sperlle sperlle at yahoo.com
Sat Mar 25 10:05:14 EST 2006


On Sat, 25 Mar 2006 07:06:59 +0100, Fredrik Lundh wrote:

> Michael Sperlle wrote:
> 
>> I need to write out a file containing the # comment. When I try to
>> specify it as part of a literal, everything afterward turns into a
>> comment.
> 
> "turns into a comment" in what sense ?  from your description, it sounds
> like a bug in your editor's syntax highlighter.  Python itself definitely
> won't look for comment markers inside string literals.
> 

Thanks, I just tried it again and it worked. I must have had a misplaced
bit.








More information about the Python-list mailing list