On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau <courn...@gmail.com>wrote:

> On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen <p...@iki.fi> wrote:
> > Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
> > [clip]
> >>     I looked more in detail on what would be needed to port numpy to
> >> py3k. In particular, I was interested at the possible strategies to keep
> >> one single codebase for both python 2.x and python 3.x. The first step
> >> is to remove all py3k warnings reported by python 2.6. A couple of
> >> recurrent problems
> >>     - reduce is removed in py3k
> >>     - print is removed
> >
> > Print is not removed, just changed to a function. So,
> >
> >        print("foo")
>
> Yes, as reduce, they are still available, but not as builtins anymore.
> But replacing print is not as easy as reduce. Things like print
> "yoyo", a do not work, for example.
>

I think the point is that you can just change it to print("yoyo") which will
work in both python 2.x and 3.x.  The parenthesis are just extraneous in
python 2.x. Now, the more complicated uses of print won't be as easy to
change, but I'm not sure how prevalent their use is.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to