Hi,

Here:
https://github.com/cython/cython/blob/master/Cython/Compiler/Parsing.py#L708-L711
compile-time unicode and bytes values should be wrapped
with EncodedString and BytesLiteral respectively:

    elif isinstance(value, _unicode):
        return ExprNodes.UnicodeNode(pos, value=EncodedString(value))
    elif isinstance(value, _bytes):
        return ExprNodes.BytesNode(pos, value=BytesLiteral(value))

Otherwise attempts to use compile-time strings in Python context result
in errors like "AttributeError: 'unicode' object has no attribute 'is_unicode'".

Best regards,
Nikita Nemkin
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to