Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Ah, he's checking it once, he's checking it's twice.
Clever.
But in this example he's not actually checking the list twice, only the existence of the list. Another great example of lacking project requirements. -
JohanO20508y@erikdreyer11 ask Santa ;-)
"He's making a list, and checking it twice, gonna find out who's naught or nice" -
@TktStatusPICNIC I don't know. I don't python. 😂
But I assume that it's like JavaScript, where p is the index of non_list. -
unlike js, p does represent that object fortunately. I always end up using jquery's $.each when I can because of that
@kanduvisla -
@kyleperik thanks. I agree that js's approach also is a bit questionable. ES6 introduced a lot of better approaches to this problem. Python is still on my to-do list to learn, but haven't found a good use case for it yet.
Christmas song rebus:
undefined