Andrew M. Kuchling | a8defaa | 2001-05-05 16:37:29 +0000 | [diff] [blame] | 1 | \documentclass{howto} |
| 2 | |
| 3 | % $Id$ |
| 4 | |
| 5 | \title{What's New in Python 2.2} |
| 6 | \release{0.01} |
| 7 | \author{A.M. Kuchling} |
| 8 | \authoraddress{\email{amk1@bigfoot.com}} |
| 9 | \begin{document} |
| 10 | \maketitle\tableofcontents |
| 11 | |
| 12 | \section{Introduction} |
| 13 | |
| 14 | {\large This document is a draft, and is subject to change until the |
| 15 | final version of Python 2.2 is released. Currently it's not up to |
| 16 | date at all. Please send any comments, bug reports, or questions, no |
| 17 | matter how minor, to \email{amk1@bigfoot.com}. } |
| 18 | |
| 19 | This article explains the new features in Python 2.2. |
| 20 | Python 2.2 includes some significant changes that go far toward cleaning up |
| 21 | the language's darkest corners. |
| 22 | |
| 23 | This article doesn't attempt to provide a complete specification for |
| 24 | the new features, but instead provides a convenient overview of the |
| 25 | new features. For full details, you should refer to 2.2 documentation |
| 26 | such as the Library Reference and the Reference Guide, or to the PEP |
| 27 | for a particular new feature. |
| 28 | |
| 29 | The final release of Python 2.2 is planned for October 2001. |
| 30 | |
| 31 | %====================================================================== |
| 32 | \section{PEP 234: Iterators} |
| 33 | |
| 34 | XXX |
| 35 | |
| 36 | \begin{seealso} |
| 37 | |
| 38 | \seepep{234}{Iterators}{Written by Ka-Ping Yee and GvR; implemented |
| 39 | by the Python Labs crew, mostly by GvR and Tim Peters.} |
| 40 | |
| 41 | \end{seealso} |
| 42 | |
| 43 | %====================================================================== |
| 44 | \section{PEP 252: Type and Class Changes} |
| 45 | |
| 46 | XXX |
| 47 | |
| 48 | \begin{seealso} |
| 49 | |
| 50 | \seepep{252}{Making Types Look More Like Classes}{Written and implemented |
| 51 | by GvR.} |
| 52 | |
| 53 | \end{seealso} |
| 54 | |
| 55 | %====================================================================== |
| 56 | \section{New and Improved Modules} |
| 57 | |
| 58 | \begin{itemize} |
| 59 | |
| 60 | \item XXX |
| 61 | |
| 62 | \end{itemize} |
| 63 | |
| 64 | |
| 65 | %====================================================================== |
| 66 | \section{Other Changes and Fixes} |
| 67 | |
| 68 | XXX |
| 69 | |
| 70 | \begin{itemize} |
| 71 | |
| 72 | \item XXX Nested scoping enabled by default |
| 73 | |
| 74 | \item XXX C API: Reorganization of object calling |
| 75 | |
Andrew M. Kuchling | 3b923fc | 2001-05-19 19:35:46 +0000 | [diff] [blame] | 76 | \item XXX .encode(), .decode() string methods. Interesting new codecs such |
| 77 | as zlib. |
| 78 | |
Andrew M. Kuchling | a8defaa | 2001-05-05 16:37:29 +0000 | [diff] [blame] | 79 | %Original log message: |
| 80 | |
| 81 | %The call_object() function, originally in ceval.c, begins a new life |
| 82 | %as the official API PyObject_Call(). It is also much simplified: all |
| 83 | %it does is call the tp_call slot, or raise an exception if that's |
| 84 | %NULL. |
| 85 | |
| 86 | %The subsidiary functions (call_eval_code2(), call_cfunction(), |
| 87 | %call_instance(), and call_method()) have all been moved to the file |
| 88 | %implementing their particular object type, renamed according to the |
| 89 | %local convention, and added to the type's tp_call slot. Note that |
| 90 | %call_eval_code2() became function_call(); the tp_slot for class |
| 91 | %objects now simply points to PyInstance_New(), which already has the |
| 92 | %correct signature. |
| 93 | |
| 94 | %Because of these moves, there are some more new APIs that expose |
| 95 | %helpers in ceval.c that are now needed outside: PyEval_GetFuncName(), |
| 96 | %PyEval_GetFuncDesc(), PyEval_EvalCodeEx() (formerly get_func_name(), |
| 97 | %get_func_desc(), and eval_code2(). |
| 98 | |
| 99 | \end{itemize} |
| 100 | |
| 101 | |
| 102 | |
| 103 | %====================================================================== |
| 104 | \section{Acknowledgements} |
| 105 | |
| 106 | The author would like to thank the following people for offering |
| 107 | suggestions on various drafts of this article: No one yet. |
| 108 | |
| 109 | \end{document} |