News for hackers. Stuff that matters.
Re:Why People Should Learn Python by wiz21c on Wednesday August 24, 2016 @05:47AM (#12350798)
1. a matter of tast

2. care to elaborate ?

3. it's not divided, it's evolving from 2 to 3. Java's community is under Oracle's grip, don't know if it's any better...

4. it's not because you can do it that it's worth to do it, so in practice API are just not changing at runtime

5. I can say the same of my industrial strength Java environment...

6. Not a problem since what you do doesn't require speed

7. Ever used PyCharm ? I wouldn't say it's poor tooling. The debugger is fine. What I miss is something like a good profiler to look at running code.

But I'd say :

8. Optional typing should've been there from day one, it'd made code editor, tooling better

9. The date/time handling is not good

10. SOA support is weak (and in the kind of setting I am, we use tons of XSD, WSDL, XML, security, signature you name it)

Re:Why People Should Learn Python by mertd on Wednesday August 24, 2016 @07:02AM (#12351091)
#2 is because it is more "pythonic" to ask for forgiveness than permission (EAFP).

For example, rather than checking if a dictionary has an element before accessing it, you just try to access it and handle the KeyError if it doesn't. The code reads easier and the normal flow would be faster in this case.

When used in EAFP context only, I think it is fine to use exceptions as part of logic in Python. They are relatively less costly compared to C.

Re:Why People Should Learn Python by kirkdouglas on Wednesday August 24, 2016 @05:59AM (#12350847)
> What I miss is something like a good profiler to look at running code.

vprof is quite nice: https://github.com/nvdv/vprof

Re:Why People Should Learn Python by nhumrich on Wednesday August 24, 2016 @09:32AM (#12351844)
PyCharm comes with cProfile and let's you "run with Profiler". But maybe that's only the paid version.
Re:Why People Should Learn Python by dagw on Wednesday August 24, 2016 @09:34AM (#12351861)
Yup. The integrated profiler is only in the paid version