Ad
  • Custom User Avatar

    Really? No sample tests?

  • Custom User Avatar

    Good kata, great!

  • Custom User Avatar

    @Varelion, check your match case function again. You are translating '3' incorrectly.

  • Custom User Avatar

    Yeah, I automatically thought of a dictionary as what it is in Python, Hashmap, Map, etc

  • Custom User Avatar
    dictionary
    /ˈdɪkʃən(ə)ri/
    noun
    noun: dictionary; plural noun: dictionaries
    a book or electronic resource that lists the words of a language
    

    that's exactly what it is

  • Custom User Avatar

    Fun Kata, but feels more like a 7 kyu and also the description of "dictionary" is misleading since what is passed is a list.

  • Custom User Avatar

    Thank you to trashy_incel for making the changes to the description and sample tests. Hopefully now people who attempt this kata in Python will not experience the same frustration as those in the past.

    I also withdraw my assertion that the Python translation was a bad one. Reviewing the history, the kata was translated twice from the original Javascript version, with the second translation hewing very closely to the original, as per BobtheLantern's opinion. I made the incorrect assumption that the Python version was created by the same author as the Javascript one, and that was why the strict equality requirement had been carried through. I have edited the relevant post accordingly.

    My thinking is that the original author added the tests for strict equality in the JS version because every Javascript tutorial worth its salt hammers home that you should always, always, always use "===", and not doing so is generally considered bad practice (with some exceptions).

  • Custom User Avatar

    I added the type checking requirements to the description and added fixed/sample tests in Python to enforce it + invalidate solutions that use is for type-checking

  • Custom User Avatar

    added type checking requirements to the description

  • Custom User Avatar

    that's because there are tests mixing booleans and integers, the kata wants you to treat them as distinct, even though 0 == False / 1 == True in Python. closing as the OP's suggestion is not clear

  • Custom User Avatar

    that's because there are tests mixing booleans and integers, the kata wants you to treat them as distinct, even though 0 == False / 1 == True in Python

  • Custom User Avatar

    that's because there are tests mixing booleans and integers, the kata wants you to treat them as distinct, even though 0 == False / 1 == True in Python

  • Custom User Avatar

    closing as the is operator does not appear anywhere in the Python test suite, so this issue report is incorrect. False == 0 is a different issue

  • Custom User Avatar

    closing as the is operator does not appear anywhere in the Python test suite

  • Custom User Avatar

    is this really about reference equality ? i don't see the is operator used anywhere in the Python test suite, the thing everyone is complaining about is the 0 / False dichotomy in the fixed tests

  • Loading more items...