I recently discovered abstract base classes (ABC) in collections and how their clear, systematic approach and Mixins are. Now I also want to create custom strings (*), but I could not find ABC for strings.
There is a UserString, but a UserDict is not recommended !? The output from the line itself would not have Miksinov? How can you access a piece of data "data" in overridden methods?
Somewhere I saw sentences that can be obtained from Sequence and Hashable, but then I could not write if 'test' in my_string: ?!
Which approach do you recommend?
(*) Reasons: - write lines that are ordered internally in a specific way - create a line (as part of the enumeration) that produces errors when comparing with values outside the enumeration area
source share