[Numpy-discussion] Porting strategy for py3k
Thu Apr 23 14:39:10 CDT 2009
On Thu, Apr 23, 2009 at 09:52, David Cournapeau <firstname.lastname@example.org> wrote:
> On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen <email@example.com> wrote:
>> Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti:
>>> 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,
> 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.
Doesn't the 2to3 tool do this conversion for you?
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion