Ad
  • Custom User Avatar
  • Custom User Avatar

    I am facing the same ppl bro did the author fixed it ?

  • Custom User Avatar

    I did something similar, but it just didn't work.

  • Custom User Avatar

    used almost the same method, nice though)

  • Custom User Avatar

    This is actually an issue, raised 8 years later :-)

  • Custom User Avatar

    Sample and fixed tests such as 0.23 and 0.785 should be added across all languages to invalidate such solutions

  • Custom User Avatar

    Description should be language-agnostic

  • Custom User Avatar

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

  • Custom User Avatar

    Uh sorry for not answering, but yes, I've seen your proposal. I wanted to create a fork to test it out but got busy and never got back to the topic.

    It would be cool if oyu could at leat create a fork to test the approach, or even fix the issue right away. If you can't then I will, but I do not know exactly when. I have the issue in my backlog nonetheless.

  • Custom User Avatar

    @hobovsky did you see this?

  • Custom User Avatar

    Well, the docs are very clear when it comes to explaining the raise keyword. This is the standard, most acceptable way of reporting that something went wrong in the code. What would you suggest instead?

    I'm not trying to sound condescending (and I hope I'm not being toxic here!), but I don't understand how you could possibly use try here.

  • Custom User Avatar

    Thanks. I do know about documentation. Please, take trouble and read it (your link). From the first page you've got try:/except: examples of raising ValueError. What I suggested, might improve this kata and Codewars in general. If there would be less trouble with single instances (katas), the better resourse it would be. Yours (1 kyu rating) is not for being toxic, right? :-)

  • Custom User Avatar

    Not a lot better but, what about this?

      it("Test zero", function() {
        assert.ifError(circleArea(0));
        assert.throws(() => circleArea(0), Error);
      });
    

    That shows this error:

    Error: the string "Error" was thrown, throw an Error :)
    
  • Custom User Avatar

    I noticed this but I have no good idea how to prevent this. The crappy message comes from Chai :( I will try to figure something out, maybe craft my own assertion.

  • Custom User Avatar

    Searching for 'raising ValueError' and code skills previously learned lead people to try:/except: solutions.

    There's the official documentation you know...

  • Loading more items...