Python3k extended grammar

Manus Hand mjhand at concentric.net
Thu May 18 16:46:33 EDT 2000


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....)

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?

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.

One of the features I love about (and rely on) in Python is complete
type freedom.  I have countless functions that accept different types
as parameters and return differently typed results.  A function that
usually returns an integer could return a None (or a list or a class
instance, or who knows), etc., etc.

Maybe I'm just weird, but "if type(theVar) == type([])"
(or "assert" in place of "if"), etc., is all the typechecking I ever
wanted.  I'm a runtime flexibility (dynamic code generation,
etc.) addict and I know I'm not alone.

Again, I apologize for intruding on Roy's posting, but it would
put my mind at ease if Py3K were spelled out somewhere.
If the right place to look for Py3K details is in the type-sig (which
is where Roy found stuff), let me know and I'll look there.  I hate
bothering the group with something most of you already know,
but well, I'm scared.

And seeing that Roy found that Py3K might introduce all sorts of
new syntactic constructs like -> for "returns" (talk about asking
to confuse anyone coming from C/C++!!) and (presumably)
reserved words, like "Integer," etc., it makes me think I might
have *reason* to be scared.

Thanks for any responses,
Manus




More information about the Python-list mailing list