Stupid question, just need a quick and dirty fix

Chris Angelico rosuav at gmail.com
Fri Jul 22 00:45:58 EDT 2016


On Fri, Jul 22, 2016 at 2:39 PM, Jordan Bayless <jmbayless at gmail.com> wrote:
> it seems there's a) no case statement (WTF?) and b) I'm limited to how many elif statements I can use.

The latter isn't true; and you're not using elif anyway. With no case
statement, you get pushed to other, better ways of doing things, like
the much simpler way I showed in my previous email - it uses set
membership rather than a series of individual equality checks. Faster,
cleaner, much easier to work with.

ChrisA



More information about the Python-list mailing list