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
5
u/[deleted] Nov 25 '15 edited Nov 26 '15
Some of those are superficially valid.
Debatable. The whole transition was horribly horribly botched, but Py3 is here and it's fine for most use cases. Unless you're doing scientific computing.
One kind.
They should be a single line. Otherwise it should be a method. This isn't JavaScript.
I've been writing Python for many many years and I've never missed it. You can almost always do it in a better way through use of duck typing, if/elseif/dictionaries. But yes, some people might miss it coming from other languages.
Somewhat annoying in some specific cases. Makes up for it with the for/else + while/else construct.
What? You shouldn't really need to use
isunless you're doingif x is False/True, or comparing class types.isand==are very different concepts. Unless your talking about the integer cache, in which case why are you usingisto compare ints?Python 2 horribleness.
Python 3 is unicode everywhere and it's awesome, because assuming things are ascii leads to Python2's fantastic encoding issues.
So yeah, some warts in that list granted, but no real 'wats'. For some real life examples check out this talk.