micropython/tests/basics/subclass_native_str.py

11 wiersze
152 B
Python

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