Ad
  • Custom User Avatar

    Description says "Only positives integers will be used", yet 0 is generated sometimes.

  • Custom User Avatar

    Im not at this top level stuff but how do you access the Foo() class within the test cases? If I try making my own it doesn't work as the test cases require the class object specifically initilized within the test cases its self.

  • Default User Avatar

    the link in the description points to the docs for Python 2.7, which is quite ancient. it should be upgraded to more recent docs

  • Custom User Avatar

    This was a great kata, overall.

    But I would definitely write up some more tests that include other classes being inherited by base classes.

    for example.

    class Person(metaclass = Meta):
        def __init__(self, name):
            self.name = name
    
        def getName(self):
            return self.name
    
    class Bob(Person):
        def __init__(self):
            self.n = 1
            super().__init__('Bob')
    
        def bob_get(self):
            return self.n
    
    
    b = Bob() # should register two __init__ calls
    b.a = 2 # set
    b.a # get
    b.bob_get() # get for 'n' along with get for method call and method call itself
    

    There is a solution that passes your tests but doesn't pass this one so I had to improve the solution.

    So to prevent the incomplete or incorrect code from passing and making this kata a bit more complete, I would add up those tests.

    Regardless of that - Excellent stuff!

  • Custom User Avatar

    This kata needs random tests.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I think the description could do with more polishing.

    I, for one, fully expected the tests to cover corner cases such as property objects, classmethod or staticmethod objects, or custom descriptors. :-) Perhaps make it a little clearer in the text that this is not going to be required?

  • Default User Avatar
  • Custom User Avatar

    There could be more test cases, at least for nonempty function arguments.