News for hackers. Stuff that matters.
Re:Type checking in Python by csirac2 on Sunday May 18, 2014 @09:21AM (#7762974)
This is the single biggest thing I miss coming from modern Perl. Pythonistas seem very anti-type validation/checking, but with Moose classes the type stuff simplifies a lot, is declarative, self documenting, and vastly reduces certain classes of bugs.

The closest I've seen is the traits thing from Enthought, but there doesn't seem to be much buy-in from python users.

Re:Type checking in Python by doctoboggan on Sunday May 18, 2014 @12:55PM (#7763534)
Former Enthought employee here, I always liked programming with Traits. Although nowadays I use the similar but much for light weight atom[0], which was created by another former Enthoughter.

[0]: https://github.com/nucleic/atom

Re:Type checking in Python by csirac2 on Sunday May 18, 2014 @07:32PM (#7764897)
Awesome pointer, thanks!
Re:Type checking in Python by hershel on Sunday May 18, 2014 @09:38AM (#7763032)
Threes also the mypy project which offers optional static typing in python, if you're interested in such stuff.
Re:Type checking in Python by pekk on Sunday May 18, 2014 @11:32AM (#7763317)
If you write APIs which only accept this one type, then you are explicitly disallowing people from using types that are functionally equivalent as far as the API is concerned. Why should you do that?
Re:Type checking in Python by csirac2 on Sunday May 18, 2014 @07:30PM (#7764886)
That's not how these trait/type systems work.