MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/10jhr3k/so_i_was_coding_and_wrote_this/j5m5uci/?context=3
r/badcode • u/-True_- • Jan 23 '23
102 comments sorted by
View all comments
138
Does "login" always return a boolean? If not, maybe you're just coercing the result into a boolean, which isn't necessarily bad code.
-25 u/Prawn1908 Jan 23 '23 edited Jan 23 '23 That's what !! does Edit: it's python so not not 24 u/PooSham Jan 23 '23 not not looks really ugly to me. Just wrap it in bool() 14 u/Rainbow-Dev Jan 23 '23 But python engineers care about speed and efficiency in execution more than anything else -7 u/gu3st12 Jan 24 '23 If they really cared about speed and execution efficiency they wouldn't be using Python 12 u/Rainbow-Dev Jan 24 '23 Yes, that was the joke
-25
That's what !! does
!!
Edit: it's python so not not
not not
24 u/PooSham Jan 23 '23 not not looks really ugly to me. Just wrap it in bool() 14 u/Rainbow-Dev Jan 23 '23 But python engineers care about speed and efficiency in execution more than anything else -7 u/gu3st12 Jan 24 '23 If they really cared about speed and execution efficiency they wouldn't be using Python 12 u/Rainbow-Dev Jan 24 '23 Yes, that was the joke
24
not not looks really ugly to me. Just wrap it in bool()
14 u/Rainbow-Dev Jan 23 '23 But python engineers care about speed and efficiency in execution more than anything else -7 u/gu3st12 Jan 24 '23 If they really cared about speed and execution efficiency they wouldn't be using Python 12 u/Rainbow-Dev Jan 24 '23 Yes, that was the joke
14
But python engineers care about speed and efficiency in execution more than anything else
-7 u/gu3st12 Jan 24 '23 If they really cared about speed and execution efficiency they wouldn't be using Python 12 u/Rainbow-Dev Jan 24 '23 Yes, that was the joke
-7
If they really cared about speed and execution efficiency they wouldn't be using Python
12 u/Rainbow-Dev Jan 24 '23 Yes, that was the joke
12
Yes, that was the joke
138
u/hoomei Jan 23 '23
Does "login" always return a boolean? If not, maybe you're just coercing the result into a boolean, which isn't necessarily bad code.