HN2new | past | comments | ask | show | jobs | submitlogin

I for one like the 2.x style print function. I see why it would be a bad idea to have a separate syntax for print from a purist point of view.

But least for smallish scripts which print a lot it give you a better overview because the print line look different than other lines. Sometimes prints can almost be like comments.



> I for one like the 2.x style print function.

2.x didn't have a print function, unless you mean the one from 3 available with a from __future__ import.


In case the grandparent doesn't realize, 2.x has a print statement not function.


I meant function as in functionality. This is really pointless nitpicking.


Knowing the difference between functions and statements is not pointless nitpicking. Not in the least.


Normally I would agree with you - but one of the epic changes between 2.x and 3.x python, was the change of print from a statement to a function - so, in this case, it's not so much nitpicking as pointing out one of the major changes between the two streams of python.


Actually it's a procedure because it has a side-effect.


In python, they are called "functions" whether or not they have side effects. (And, actually, in most programming languages I've seen that have different constructs called "function" and "procedure", the difference is that functions have a return value and procedures don't -- usually, both can have side effects.)


Have you ever used a functional programming language?




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

Search: