cython/cython — pull request #199 by nnemkin (2013-03-19 13:29:01+00:00)
Title: Correctly handle compile-time strings appearing in Python context.

Compile-time ``unicode`` and ``bytes`` values should be wrapped with ``EncodedString`` and ``BytesLiteral`` respectively.
Otherwise attempts to use them in Python context (for example, returning them from a function) result in errors like ``AttributeError: 'unicode' object has no attribute 'is_unicode'``

Details: I had a compile-time constant PLATFORM = u'win32' (just an example) and Cython failed on a function like:

def get_platform():
return PLATFORM