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.
I get this with a code using recursion:
This comes from the tests and not from my code. Tests should be designed to handle this in a cleaner way since that's part of the challenge, so that they don't throw an exception but fail and return a message meaningful to the user.
Rust Translation
https://www.codewars.com/kumite/65054d57bc47bc00316babd1
import
s andtest.it
in tests - https://docs.codewars.com/languages/python/codewars-testSince
Term
andOperator
are crucial data structure used by the kata they should be defined in Preloaded and imported by user code and test code.If user code wants to expand them they can subclass them, and if everyone is handling them properly (like using
isinstance
instead ofis
, andmatch
expression which does the former) this should not cause any problems.Two equal operators may or may not compare identical via is.
This is totally unclear. I guess you mean that the tests will never try to compare operators?...and will be parsable unambiguously.
There is absolutely no parsing involved, since the inputs are not strings. => that point should be either removed or reworded.Hi,
that's a pretty interesting idea. But shouldn't it be pushed further, using also other kinds of operators? (unary? parenthesis? ofc, that's a completely different task/setup)
If not, the description should mention upfront that all operators are binary ones. Currently, it's implied for most of the description, and confirmed somewhere in the bottom part only.
Cheers
=> unpublishing. Publishing a kata like this without random tests is just begging for troubles. ;)