Python3k extended grammar

Martijn Faassen m.faassen at vet.uu.nl
Thu May 18 18:19:10 EDT 2000


Manus Hand <mjhand at concentric.net> wrote:
> This is a dumb question, and I know I shouldn't be following Roy's
> post with it, since my question is only tangentially related, but....

> (By the way, I agree with Roy that the less new syntax and fewer
> new keywords the better!  Anyway, as to my own question....)

I agree here too. While the types-SIG has come up with many good
thoughts, I don't think the proposed syntax is ideal yet. Though
perhaps it's more a question of getting used to it. Still, the ':'
is overloaded a lot already in Python, and -> looks a trifle
odd if it's used in just one place. the 'return' proposal looks
prettier to me. But then I change my syntax preference daily. :)

> It was with a large degree of alarm that I read that "the language
> (Py3K) will be somewhat incompatible."  There didn't seem to be
> anyplace at python.org that explains this any further.  Maybe it has
> been rehashed before, but could the scope of Py3K be spelled out
> for those of us who fear it?

Nobody knows yet. It's possible that it'll be case insensitive,
which is of course incompatible. Oh, and 1/2 might give you
a float.

Rather minor changes. Then of course..

> Things like talk about having to declare variables and their
> types and having to specify function return types scare
> me.  They scare me to death.  I love Python, but if stuff like
> that becomes required, I will stick with 1.6 forever.  If
> someone will reassure me that I won't *have* to use typing
> and declaration, then I will be happier.  Much.

Right; if it was required to declare variables, I'd be scared too.
Luckily it's never been the plan to make such declarations required.
They're always optional.

That didn't stop some of us paranoid folks from worrying on the types-SIG,
though. I was wondering if there mightn't be subtle pressures towards
the idea that full type annotation is good Python style, somehow, 
and worried about this ghostly image. Not so much by the language 
(though there's the const-correctness infection in C++), as by the
culture surrounding the language. Currently type annotations are
just too vague to be really worried about such spectres, though. 

So the short answer is: don't worry, they'll be optional. We understand
the enormous value of dynamic type-checking in the Python world.

Plans about Py3k are completely vague, however, so I'm probably talking
through my hat. :)

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list