Hi,

Lisandro Dalcin wrote:
> I was actually thinking about string literals with pure-ascii
> characters.

I hope you're not proposing to handle them differently from other string 
literals.


> My intention is just if I write this in a 'pyx' file
> 
> meth = "__call__"
> if hasattr(someobj, meth):
>    do_something(...)
> 
> then this code should work as expected in Py2.X and Py3. Does this make sense?

If you want it to run on both Py2 and Py3, make that

    meth = u"__call__"

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to