<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><table><tbody><tr><td>

            <br></td>
            
<td>
<div>
    <div>
        <p>This <a href="http://docs.python.org/2/reference/lexical_analysis.html#string-literals" rel="nofollow" target="_blank">python string literals documentation</a> couldn't explain: single quote presence inside double quoted string and viceversa.</p>




<p>I think both double quoted string and single quoted string need to be
 defined differently for representing the 'stringliteral' lexical 
definition.</p>

<blockquote>
<pre><code><span>shortstringchar </span><span>::=</span><span>  </span><span><</span><span>any source character </span><span>except</span><span> </span><span>"\" or newline or the quote></span></code></pre>



</blockquote>

<p>here in this definition 'the quote' isn't specific whether single (<code>'</code>) or double (<code>"</code>).</p><p>I asked this question here, <a href="http://stackoverflow.com/questions/16435233/this-python-string-literals-documentation-couldnt-explain-me-single-quote-pres" target="_blank">http://stackoverflow.com/questions/16435233/this-python-string-literals-documentation-couldnt-explain-me-single-quote-pres</a>,  . I was advised to ask here</p>

<span class=""><font color="#888888">

    </font></span></div></div></td></tr></tbody></table><span class=""><font color="#888888"><br clear="all"><br>-- <br>Alok Nayak<br>Gwalior, India<br>
</font></span></div>
</div><br><br clear="all"><br>-- <br>Alok Nayak<br>Gwalior, India<br>
</div>