Set .discard(), .remove() & .pop()

  • + 1 comment

    Why do something that fragile, slow and insecure when you could just use getattr? Or put the methods in a dict? Since we know the set of operations precisely, there's even less excuse for eval. What is the point of eval when you know exactly what code you are going to run?