mirror of
https://github.com/micropython/micropython.git
synced 2026-05-01 13:20:14 +02:00
69b415f745
Testing for equality of subclassed strings now works, thanks to commit
3aab54bf43
11 lines
152 B
Python
11 lines
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)
|