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.
Tests have been updated
The current set of methods does not teach solvers a best practice.
It is also not understandable, why you ask to implement hash method, if you don't use it as designed (i.e. testing sets of IpAddress, using IpAddress as key of dict, etc.)
Not sure that copying every single bit from standard library will be helpful
Yeah, it all makes sense. @Voile apologies for being overly defensive. Shouldn't have been answering to the comments in the middle of the night.
ipaddress
also has__format__
, and also allows adding/subtracting integers from them, and also has a ton of other functionalities, so...There should be enforced methods
__int__
,__bytes__
.There should not be method
from_string
, rather the class should accept various types in__new__
, like here https://docs.python.org/3/library/ipaddress.htmlthe true question here is: is that very difficult to generate random tests for your kata (edit: or a limited set of possible inputs)? As long as the answer is no, the random tests are mandatory.
Not even trying to convince. Just pointing out that the rule that not enforced autotaically and has exceptions can not be mandatory.
Please explain what makes you kata so special you can just ignore the standard practice for every kata. Note that this has been done only for several katas out of thousands of katas, and it's usually due to severe technical limitations, not "I believe my kata is so simple/elegant random test cases aren't necessary". You're not gonna convince everyone around (include me) with that here.
Thanks for the implementation. I see how tests should be updated to handle the 'hash' cases properly
it is not mandated for every kata, see "Under some rare circumstances, it is allowed to use so-called randomized tests instead of fully random ones."
Terminology is quite weak in this section of documentation. I doubt that it is expected to have truly random tests instead of tests with randomised testing values.
I will update the tests, making the basic ones (visible to user) with only fixed inputs. And extended version with randomised inputs, duplicating existing ones. Even though the solution passing all the already provided tests will be laborious enough to be seen as actually showing the skillset reauired to solve this kata normally.
It is mandated by every kata: see https://docs.codewars.com/authoring/guidelines/submission-tests#random-tests
There should be random tests.
woah... decorators are cool... i should be using them more. Thanks for showing me they exist
Loading more items...