Commit a63120f5 authored by Stefan Behnel's avatar Stefan Behnel

new tests for various unicode()/str() usage patterns

parent b3547987
__doc__ = """
>>> s('test')
'test'
>>> z
'test'
>>> c('testing')
'testing'
>>> sub('testing a subtype')
'testing a subtype'
>>> subs('testing a subtype')
'testing a subtype'
# >>> csub('testing a subtype')
# 'testing a subtype'
# >>> csubs('testing a subtype')
# 'testing a subtype'
"""
s = str
z = str('test')
def c(string):
return str(string)
class subs(str):
pass
def sub(string):
return subs(string)
#cdef class subs(str):
# pass
#def csub(string):
# return csubs(string)
__doc__ = """
>>> u('test')
u'test'
>>> z
u'test'
>>> c('testing')
u'testing'
>>> subu('testing a Python subtype')
u'testing a Python subtype'
>>> sub('testing a Python subtype')
u'testing a Python subtype'
# >>> csubu('testing a C subtype')
# u'testing a C subtype'
# >>> csub('testing a C subtype')
# u'testing a C subtype'
"""
u = unicode
z = unicode('test')
def c(string):
return unicode(string)
class subu(unicode):
pass
def sub(string):
return subu(string)
#cdef class csubu(unicode):
# pass
#def csub(string):
# return csubu(string)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment