<dl class="function" style="margin-bottom:15px;background-color:rgb(255,255,255)"><dt id="PyUnicode_1BYTE_DATA"><a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#Py_UCS1" title="Py_UCS1" style="font-family:sans-serif;font-size:17px;color:rgb(53,95,124);text-decoration:none">Py_UCS1</a><span style="font-family:sans-serif;font-size:17px">* </span><tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_1BYTE_DATA</tt><big style="font-family:sans-serif">(</big><a class="reference internal" href="http://docs.python.org/dev/c-api/structures.html#PyObject" title="PyObject" style="font-family:sans-serif;font-size:17px;color:rgb(53,95,124);text-decoration:none">PyObject</a><em style="font-family:sans-serif;font-size:17px"> *o</em><big style="font-family:sans-serif">)</big></dt>
<dt id="PyUnicode_1BYTE_DATA" style="font-family:sans-serif;font-size:17px"><a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#Py_UCS2" title="Py_UCS2" style="color:rgb(53,95,124);text-decoration:none">Py_UCS2</a>* <tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_2BYTE_DATA</tt><big>(</big><a class="reference internal" href="http://docs.python.org/dev/c-api/structures.html#PyObject" title="PyObject" style="color:rgb(53,95,124);text-decoration:none">PyObject</a><em> *o</em><big>)</big><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_1BYTE_DATA" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dt id="PyUnicode_2BYTE_DATA" style="font-family:sans-serif;font-size:17px"><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_2BYTE_DATA" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dt id="PyUnicode_4BYTE_DATA" style="font-family:sans-serif;font-size:17px"><a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#Py_UCS4" title="Py_UCS4" style="color:rgb(53,95,124);text-decoration:none">Py_UCS4</a>* <tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_4BYTE_DATA</tt><big>(</big><a class="reference internal" href="http://docs.python.org/dev/c-api/structures.html#PyObject" title="PyObject" style="color:rgb(53,95,124);text-decoration:none">PyObject</a><em> *o</em><big>)</big><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_4BYTE_DATA" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dd style="font-family:sans-serif;font-size:17px;margin-top:3px;margin-bottom:10px;margin-left:30px;text-align:justify;line-height:21px"><p style="margin-top:0px">Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 integer types for direct character access. No checks are performed if the canonical representation has the correct character size; use <a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_KIND" title="PyUnicode_KIND" style="color:rgb(53,95,124);text-decoration:none"><tt class="xref c c-func docutils literal" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:0.95em;font-weight:bold"><span class="pre">PyUnicode_KIND()</span></tt></a> to select the right macro. Make sure <a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_READY" title="PyUnicode_READY" style="color:rgb(53,95,124);text-decoration:none"><tt class="xref c c-func docutils literal" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:0.95em;font-weight:bold"><span class="pre">PyUnicode_READY()</span></tt></a> has been called before accessing this.</p>
<p class="versionadded" style="margin-top:0px"><span class="versionmodified" style="font-style:italic">New in version 3.3.</span></p></dd></dl><dl class="macro" style="margin-bottom:15px;font-family:sans-serif;font-size:17px;background-color:rgb(255,255,255)">
<dt id="PyUnicode_WCHAR_KIND"><tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_WCHAR_KIND</tt><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_WCHAR_KIND" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dt id="PyUnicode_1BYTE_KIND"><tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_1BYTE_KIND</tt><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_1BYTE_KIND" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dt id="PyUnicode_2BYTE_KIND"><tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_2BYTE_KIND</tt><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_2BYTE_KIND" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dt id="PyUnicode_4BYTE_KIND"><tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_4BYTE_KIND</tt><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_4BYTE_KIND" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dd style="margin-top:3px;margin-bottom:10px;margin-left:30px;text-align:justify;line-height:21px"><p style="margin-top:0px">Return values of the <a class="reference internal" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_KIND" title="PyUnicode_KIND" style="color:rgb(53,95,124);text-decoration:none"><tt class="xref c c-func docutils literal" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:0.95em;font-weight:bold"><span class="pre">PyUnicode_KIND()</span></tt></a> macro.</p>
<p class="versionadded" style="margin-top:0px"><span class="versionmodified" style="font-style:italic">New in version 3.3.</span></p></dd></dl><dl class="function" style="margin-bottom:15px;font-family:sans-serif;font-size:17px;background-color:rgb(255,255,255)">
<dt id="PyUnicode_KIND">int <tt class="descname" style="background-color:transparent;padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:1.2em;font-weight:bold">PyUnicode_KIND</tt><big>(</big><a class="reference internal" href="http://docs.python.org/dev/c-api/structures.html#PyObject" title="PyObject" style="color:rgb(53,95,124);text-decoration:none">PyObject</a><em> *o</em><big>)</big><a class="headerlink" href="http://docs.python.org/dev/c-api/unicode.html#PyUnicode_KIND" title="Permalink to this definition" style="color:rgb(198,15,15);text-decoration:none;font-size:0.8em;padding-top:0px;padding-right:4px;padding-bottom:0px;padding-left:4px"></a></dt>
<dd style="margin-top:3px;margin-bottom:10px;margin-left:30px;text-align:justify;line-height:21px"><p style="margin-top:0px">Return one of the PyUnicode kind constants (see above) that indicate how many bytes per character this Unicode object uses to store its data. <em>o</em> has to be a Unicode object in the “canonical” representation (not checked).</p>
<p class="versionadded" style="margin-top:0px"><span class="versionmodified" style="font-style:italic">New in version 3.3.</span></p></dd></dl>-- <br> 此致<br>礼<br>罗勇刚<br>Yours<br> sincerely,<br>Yonggang Luo<br>
<br>