News for hackers. Stuff that matters.
Re:Why Do Python Lists Multiply Oddly? Exploring the CPython... by kerkeslager on Tuesday April 09, 2024 @11:58AM (#39980804)
> If you want mutable values in your language, you need to expect values to mutate. So what should list multiplication do?

bitmc can correct me if I'm misinterpreting them, but I feel like what they're saying is that multiplying a list by a number doesn't make sense, so it should throw a type error. That feels reasonable to me (and it's the choice I'm making in the interpreter I'm writing).

There are no comments on this comment yet.