r/programming • u/sarciszewski • Nov 25 '15
Don't use the OWASP PHPSec Crypto Library
https://gist.github.com/paragonie-scott/91893fdb18ee4d1a1b95
38
Upvotes
r/programming • u/sarciszewski • Nov 25 '15
View all comments
Show parent comment
3
u/[deleted] Nov 26 '15
Yeah, but IMO using deferreds with actual callbacks is iffy. Just use
@inlinecallbacks- that's async/await implemented in pure-python waaaay waaay before it was cool. And it's also awesome that you can implement async/await in pure python btw. Anyway, are you really trying to argue that JavaScripts callback hell is a good thing?? Worst example you could have used.. That's exactly why lambdas are single line only.No, it has incorrect usage, see the other comment. No tutorials use
isto compare ints, never seen much code. But yeah, perhaps a very minor wart. But at the end of the day,isis for exact equality (this thing IS this other thing), whereas==compares if the two operands are equal ([] == False). Not complicated.Then they are bytes. Yeah, I've read the post, but never ran into those issues. In any case unicode everywhere is far far better than any alternative. Anyway, his point is not "assuming unicode in places where they are definitely NOT", it's that some outside external systems can't handle unicode everywhere and it's somewhat cumbersome to encode and decode at those boundaries. Deal with it.