you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 3 weeks ago (2 children)
basket = [ guillotine(billionaire) for billionaire in population ]
  • source
  • parent
  • hideshow 4 child comments
  • [–] 13 points 3 weeks ago (1 child)

    Almost. You just committed genocide.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

    Nah he'll get a TypeError. Not seeing why, honestly...

    Unless you consider the merciless and systematic execution of all billionaires to be genocide...which I guess is technically fair...but it's for a good cause! (...said every genocidist ever...)

    Of course, I changed the name of the iterable...

    And we're talking about intro to compsci...getting a bit ahead of ourselves going right from loops to comprehension.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 8 points 3 weeks ago

    He just called everyone in the population a billionaire and executed them without actually checking if they are in fact billionaires. Somewhat too close to reality in some scenarios for my taste...

  • source
  • parent
  • [–] 7 points 3 weeks ago*

    Nope, billionaire is a designator, not a discriminator. They're iterating over population and decapitating everyone regardless of wealth. ;)

    It's missing an if <someOtherDesignatorForPopulatioMember> in billionaires in the comprehension.

  • source
  • parent