summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/subclass_native_str.py
blob: 32090ce270c8c027bb8f0df625ca9c1f5090c7ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# Test subclassing built-in str

class S(str):
    pass

s = S('hello')
print(s == 'hello')
print('hello' == s)
print(s == 'Hello')
print('Hello' == s)