William Stein wrote:
> On 9/11/07, Jaap Spies <[EMAIL PROTECTED]> wrote:
>> I did not find this here:
>> http://docs.python.org/dev/3.0/whatsnew/3.0.html
>>
>> The 'old' behaviour seems to be continued:
> 
> Specifically what he said in his talk would change is the following:
> 
> fake-python3000> n = 5
> fake-python3000> v = [n*n for n in range(15)]
> fake-python3000> print(n)
> 5
> 
> I have no idea if he's implemented anything yet like this.
>

Yes this works as announced:
Python 3.0a1 (py3k, Sep 11 2007, 12:17:34)
[GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> n = 5
 >>> v = [n*n for n in range(15)]
 >>> print(n)
5
 >>>

> 
> You can already use print as a function right now:
> 
>>>> print(5)
> 5
> 
> Of course this is silly, since it's just "print (5)" and the parenthesis
> do nothing.  Guido said at his talk that using print that was is
> good practice though, in preparation for Python 3000.
> 

The 2to3 tool is capable to handle the print ... conversion to print(...),
so this is a minor problem.

Jaap


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to