micropython/tests/basics/subclass_native_str.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
152 B
Python
Raw Normal View History

# Test subclassing built-in str
class S(str):
pass
s = S('hello')
print(s == 'hello')
print('hello' == s)
print(s == 'Hello')
print('Hello' == s)