<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>---------- Forwarded message ----------</div>From: Stefan Behnel <<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>><br>
To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Mon, 17 May 2010 11:33:40 +0200<br>Subject: Re: Issue with PyUnicodeObject type variables<br>gmail, 17.05.2010 11:24:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
A variable whose data type is PyUnicodeObject checked whether it is a UnicodeObject type.<br>Got output as false<br><br>example :<br><br>PyUnicodeObject *p;<br>if (PyUnicode_Check(path)) {<br> printf("\nTrue.\n");<br>
<br>}<br>else {<br> printf("\nfalse.\n");<br>}<br><br>output: false<br></blockquote><br>Doesn't surprise me at all. Could you make sure this is the code you are using? Especially the names 'p' and 'path'? And that you are initialising neither of the two in your code?<br>
<br>Stefan<br></span><br>
<div><br></div><div>Tat was a typo mistake instead of *p pls consider *path as follows.</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">PyUnicodeObject *path;<br>
if (PyUnicode_Check(path)) {<br> printf("\nTrue.\n");<br><br>}<br>else {<br> printf("\nfalse.\n");<br>}</span></div>