Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No issue here: you chose to override the classes in preloaded. They are there for a reason. Don't be surprised you get in undebuggable situations if you actually twist the context in which you're solving the kata.
For instance, your
Or.__str__
is different from the one supposedly used.Keep in mind that the string you see in the assertion messages are stringified versions of your CST. For instance, it seems you're returning
Str(Or(...))
for that input while you're supposed to return onlyOr(...)
. So your "correct" solution is actually incorrect.You get the discrepancy between the fixed and random tests because the supposed to be
Or
class is supposed to stringify itself adding parentheses around itself too. As long as your (inappropriate) definition ofOr
changes this behavior and that the ref solution uses your (inappropriate) classes to build the CST, the parentheses aren't there anymore in the expected result of the random tests, yes. But that's totally on you. ;)Closing.
cheers
This comment is hidden because it contains spoiler information about the solution