circuitpython/tests/basics/subclass_native_str.py

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)