5 ms·
In Python, "elif" means "else if". At most one of "bright!" or "light!" will print. $ python >>> if True: ... print "First" ... elif True: ... pr
by isp 11y ago
In Python, "elif" means "else if". At most one of "bright!" or "light!" will print.
$ python
>>> if True:
... print "First"
... elif True:
... print "Second"
...
First
>>>
- coldtea 11y agoI know what elif means in Python (been doing it since 1998 -- remember Zope?). That's not the code in his example. Here's that code: https://youtu.be/wf-BqAjZb8M?t=40m41s https://youtu.be/wf-BqAjZb8M?t=40m41s
- isp 11y agoApologies - I think we've been talking at cross purposes. I was referring to the code up-thread in https://news.ycombinator.com/item?id=10025412 https://news.ycombinator.com/item?id=10025412 , which (unlike the presentation) uses "elif".
- coldtea 11y ago>Apologies - I think we've been talking at cross purposes. Yeah, didn't pay close attention to it, thought it was the same as the one I saw in the presentation.