Suggested coding style
Westley MartÃnez
anikom15 at gmail.com
Thu Sep 29 12:42:11 EDT 2011
On Thu, Sep 29, 2011 at 05:23:30AM -0700, rantingrick wrote:
> On Sep 29, 5:37 am, Passiday <passi... at gmail.com> wrote:
>
> What is so bad about breaking code in obscure places? We changed print
> to a function which broke just about every piece of code every written
> in this language. (BTW, print should ALWAYS have been a function!)
> What is so bad then about breaking some very obscure code? We could
> always have a lengthy deprecation period.
>
Well, I once thought that a print function made a lot of sense. In C,
printf is a function, however then I think why print is a function. In
C, just about every function has side effects (the return values are
more often than not either pointers or status codes). In Python
functions are encouraged to not have side-effects, so the implementation
of print as a statement or a method makes far more sense than as a
function.
But maybe I'm just batty as you all think I am.
More information about the Python-list
mailing list