Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why is that anymore dangerous than knowing how rm, rmdir, and chmod work on the commandline?

Python's os module is not exempt from permissions - it's obviously "dangerous" if you run the interpeter as root then start doing silly things like passing GET parameters to os.remove() directly... But that, IMHO, is no longer dangerous - that's just stupidity.

Really, there's nothing remotely dangerous about Python - in terms of using import os (excluding the above example which I consider idiocy), it's no more dangerous than elevating to root!?

[EDIT] I would argue that not knowing how something works is more dangerous, but that typically falls under the banner of ignorance.



"Why is that anymore dangerous than knowing how rm, rmdir, and chmod work on the commandline?"

To screw up is human. To screw up a million times per second takes a computer.

In absolute terms, the two are equivalent. But the capacity for your Python program using os.whatever to unpleasantly surprise you is much greater.


There's nothing like that sinking feeling you get when you do a DELETE FROM and forget the WHERE.


That's exactly why begin transaction is awesome.


None of that is _dangerous_ though because you've got a backup of all your data and your code is all versioned ... unless you're practicing your python on life-support systems or something?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: