homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kaizhu
Recipients benjamin.peterson, collinwinter, kaizhu, loewis, pitrou
Date 2008年10月20日.23:39:26
SpamBayes Score 8.557993e-11
Marked as misclassified No
Message-id <1224545972.64.0.648780688676.issue3238@psf.upfronthosting.co.za>
In-reply-to
Content
ported to python-2.6 & is a bit more stable (written a few py3k programs
w/ it). the patches have been simplified & consolidated to a single
file: ceval.c
u can also test out scripts generated by 2to3 by adding to them the
magic line:
"from __future__ import py3k_syntax"
an example "python-2.6" script using "python-3.0" language syntax (&
numpy if its installed) is provided @:
http://www-rcf.usc.edu/~kaizhu/work/py3to2/current/example_py3k.py
new features added by patch to python-2.6 (under py3k_syntax mode):
 pep3102 Keyword-Only Arguments
 pep3104 Access to Names in Outer Scopes
 pep3107 Function Annotations
 pep3111 Simple input built-in in Python 3000
 pep3113 Removal of Tuple Parameter Unpacking
 pep3114 Renaming iterator.next() to iterator.__next__()
 pep3115 Metaclasses in Python 3000
 pep3127 Integer Literal Support and Syntax
 - oct() functions differently in py3k_syntax mode
 pep3129 Class Decorators
 pep3132 Extended Iterable Unpacking
 pep3135 New Super
 misc exec becomes a function
sans unicode & py3k's builtins module, the above (plus __future__)
implements pretty much all of py3k's language syntax
py3k_syntax mode:
 a special bitflag is embedded in codeobj->co_argcount, which triggers
PyEval_EvalFrameEx to enable the backported opcodes (which r disabled by
default) & use an alternate py3k __builtin__.
 codeobj->co_argcount now limited to range 0-0xffff with upper bits
reserved for py3k flags
 codeobj->co_kwonlyargcount (limited to range 0-0xff) is embedded in
upper bits of codeobj->co_argcount
most of the trouble have been gettin kwonlyarg, annotations, & classes
to work.
there is one unrelated opcode (LOAD_ATTR_py3k) added to ceval.c for my
personal use (curries attributes as a universal function), but can b
safely disabled by commenting its case out of PyEvalFrameEx in ceval.c &
deleting it from dict opnew_py2x in py3to2.py
History
Date User Action Args
2008年10月20日 23:39:33kaizhusetrecipients: + kaizhu, loewis, collinwinter, pitrou, benjamin.peterson
2008年10月20日 23:39:32kaizhusetmessageid: <1224545972.64.0.648780688676.issue3238@psf.upfronthosting.co.za>
2008年10月20日 23:39:31kaizhulinkissue3238 messages
2008年10月20日 23:39:30kaizhucreate

AltStyle によって変換されたページ (->オリジナル) /