Currently, in the chars.py, you define custom classes for each special character. This is very weird behavior as it defies the purpose of classes in the first place. Each class should be a template and it is expected to be instantiated multiple times making different objects based on that blueprint. Making class singletons like these should generally be discouraged.
I've also removed the RegexChar class as a whole, since it was basically doing the same thing as RegexPattern except it was only supposed to contain one character (which wasn't actually enforced by the class).
Currently, in the
chars.py
, you define custom classes for each special character. This is very weird behavior as it defies the purpose of classes in the first place. Each class should be a template and it is expected to be instantiated multiple times making different objects based on that blueprint. Making class singletons like these should generally be discouraged.I've also removed the
RegexChar
class as a whole, since it was basically doing the same thing asRegexPattern
except it was only supposed to contain one character (which wasn't actually enforced by the class).