Ad
  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    There is no such number like "MMMMMMM". The number system limits at five M's I think.
    And I approve that this is really interesting, check mine too, it is funny as well. :)

  • Custom User Avatar

    Added

  • Default User Avatar
    1. I agree that we disagree! ;) Right about the situation, of course. But the present context doesn't seem constraining enough to require mutation. Again, seeing instance method doesn't imply mutation. Just instance method. Well, just my opinion.
    2. yes, might be a bit confusing, but it's in the description (somehow... :/ ). So you won't be my hero of the day, so sad... ;) (it comes from a somewhat-now-old TV serie)

    cheers

  • Default User Avatar
    1. yes it is. Mutation allow quirky bugs to slip through implementations where you do not expect them, especially in big projects. If you can avoid mutation, avoid it. If you're in absolute need of memory or performance, though...
    2. nope: you check if the length are different, if they are, the vectors are just not equals. You're at Disney Land, you hold the entry of an attraction. Boys go on, you check their height with a barre at fixed heigth. What do you do if their "length" isn't good? You just say "Sorry boy, you cannot do that attraction", or you throw an error "damn,-that's-not-good-that's-not-good-FIRE!-FIRE!-FIRE!-Call 0118 999 881 999 119 725...3!!!" (the person you understand that joke is my hero). Well if they are just not equal, you return False, that's all. All the same, check the description, equals is not in the functions concerned with exception.
  • Default User Avatar
    1. that's the best practice behavior, yes (EDIT: description updated)
    2. that's the normal behavior (throw an exception shouldn't even touch your mind in that case! ;) )