Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18543
| From | Lie Ryan <lie.1296@gmail.com> |
|---|---|
| Subject | Re: help me get excited about python 3 |
| Date | 2012-01-05 19:51 +1100 |
| References | <CAOFf2a3ZhAxz=sgchG0KRagEQ68rZP1N2o9=EfbHJZZFg5q7Yw@mail.gmail.com> <4F0529F2.8070900@wisc.edu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4446.1325753508.27778.python-list@python.org> (permalink) |
On 01/05/2012 03:41 PM, Evan Driscoll wrote:
> On 1/4/2012 9:56 AM, Sean Wolfe wrote:
>> I am still living in the 2.x world because all the things I want to do
>> right now in python are in 2 (django, pygame). But I want to be
>> excited about the future of the language. I understand the concept of
>> needing to break backwards compatibility. But it's not particularly
>> exciting to think about. What are the cool new bits I should be
>> reading up on?
> This should be enough to convince you:
>
> ~ : python
> Python 2.7.1 (r271:86832, May 3 2011, 10:31:28)
>>>> 1< "1"
> True
>
> ~ : python3
> Python 3.2 (r32:88445, May 3 2011, 13:26:55)
>>>> 1< "1"
> Traceback (most recent call last):
> File "<stdin>", line 1, in<module>
> TypeError: unorderable types: int()< str()
>
> Maybe with Python 4, '1< True' will give a TypeError too ;-).
>
>
> Or if that's not enough,
>
> ~ : python
> Python 2.7.1 (r271:86832, May 3 2011, 10:31:28)
>>>> True, False = False, True
>>>> "True is " + ("True" if True else "False")
> 'True is False'
>
> ~ : python3
> Python 3.2 (r32:88445, May 3 2011, 13:26:55)
>>>> True, False = False, True
> File "<stdin>", line 1
> SyntaxError: assignment to keyword
Somehow I could hear Sean saying something like: "Yeah... and so?"
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: help me get excited about python 3 Lie Ryan <lie.1296@gmail.com> - 2012-01-05 19:51 +1100
csiph-web