summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* - Add CFLAGSFORSHARED variable. configure sets this to CCSHARED if LDLIBRARYNeil Schemenauer2001-01-261-32/+25
| | | | | | is a shared library. - Add PY_CFLAGS variable (flags used to compile the interpreter) - clobber now just removes object files, libraries and binaries
* Typo: coplete --> completeFred Drake2001-01-261-1/+1
| | | | This closes SF bug #129759.
* The combo of getstate/setstate/jumpahead is very powerful, but needsTim Peters2001-01-262-8/+93
| | | | examples to flesh it out for the uninitiated. Here they are.
* SF bug 130030: Claim of bad betavariate algorithm.Tim Peters2001-01-262-7/+21
|
* Teach Windows build about new cellobject.c.Tim Peters2001-01-261-0/+15
|
* The addition of new parameters to functions in the Python/C API requiresFred Drake2001-01-251-2/+5
| | | | that PYTHON_API_VERSION be incremented.
* Correct one-line typo, reported by yole @ SF, bug 130077.Guido van Rossum2001-01-251-1/+1
|
* Fix arguments for PyFrame_New(). The previous checkin used the wrongJeremy Hylton2001-01-251-1/+0
| | | | arguments, which were based on an interim development API.
* New info in beep() docstring.Tim Peters2001-01-251-1/+4
|
* Cosmetic changes after some sleep; no change in semantics.Tim Peters2001-01-251-64/+82
|
* Better error message when non-dictionary received for **kwargJeremy Hylton2001-01-251-2/+7
|
* PEP 227 implementationJeremy Hylton2001-01-253-1/+18
| | | | | test_new: new.code() noew takes two more arguments test_grammer: Add a bunch of test cases for lambda (not really PEP 227 related)
* PEP 227 implementationJeremy Hylton2001-01-252-0/+262
| | | | New tests cases for nested scopes.
* In subst_vars(), change the name of the argument from str to s toJeremy Hylton2001-01-251-2/+2
| | | | | | | | | prevent binding for str from masking use of builtin str in nested function. (This is the only case I found in the standard library where a local shadows a global or builtin. There may be others, but the regression test doesn't catch them.)
* PEP 227 implementationJeremy Hylton2001-01-251-1/+15
| | | | | Track changes to new opcodes. Add hasfree list that applies to all ops that use the closure.
* PEP 227 implementationJeremy Hylton2001-01-252-4/+13
| | | | Track changes to PyFrame_New() and PyFuntion_New().
* Make module objects from Setup depend on Python.h headers.Neil Schemenauer2001-01-251-2/+4
|
* PEP 227 implementationJeremy Hylton2001-01-2510-338/+929
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The majority of the changes are in the compiler. The mainloop changes primarily to implement the new opcodes and to pass a function's closure to eval_code2(). Frames and functions got new slots to hold the closure. Include/compile.h Add co_freevars and co_cellvars slots to code objects. Update PyCode_New() to take freevars and cellvars as arguments Include/funcobject.h Add func_closure slot to function objects. Add GetClosure()/SetClosure() functions (and corresponding macros) for getting at the closure. Include/frameobject.h PyFrame_New() now takes a closure. Include/opcode.h Add four new opcodes: MAKE_CLOSURE, LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF. Remove comment about old requirement for opcodes to fit in 7 bits. compile.c Implement changes to code objects for co_freevars and co_cellvars. Modify symbol table to use st_cur_name (string object for the name of the current scope) and st_cur_children (list of nested blocks). Also define st_nested, which might more properly be called st_cur_nested. Add several DEF_XXX flags to track def-use information for free variables. New or modified functions of note: com_make_closure(struct compiling *, PyCodeObject *) Emit LOAD_CLOSURE opcodes as needed to pass cells for free variables into nested scope. com_addop_varname(struct compiling *, int, char *) Emits opcodes for LOAD_DEREF and STORE_DEREF. get_ref_type(struct compiling *, char *name) Return NAME_CLOSURE if ref type is FREE or CELL symtable_load_symbols(struct compiling *) Decides what variables are cell or free based on def-use info. Can now raise SyntaxError if nested scopes are mixed with exec or from blah import *. make_scope_info(PyObject *, PyObject *, int, int) Helper functions for symtable scope stack. symtable_update_free_vars(struct symtable *) After a code block has been analyzed, it must check each of its children for free variables that are not defined in the block. If a variable is free in a child and not defined in the parent, then it is defined by block the enclosing the current one or it is a global. This does the right logic. symtable_add_use() is now a macro for symtable_add_def() symtable_assign(struct symtable *, node *) Use goto instead of for (;;) Fixed bug in symtable where name of keyword argument in function call was treated as assignment in the scope of the call site. Ex: def f(): g(a=2) # a was considered a local of f ceval.c eval_code2() now take one more argument, a closure. Implement LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE> Also: When name error occurs for global variable, report that the name was global in the error mesage. Objects/frameobject.c Initialize f_closure to be a tuple containing space for cellvars and freevars. f_closure is NULL if neither are present. Objects/funcobject.c Add support for func_closure. Python/import.c Change the magic number. Python/marshal.c Track changes to code objects.
* PEP 227 implementationJeremy Hylton2001-01-254-0/+145
| | | | | | A cell contains a reference to a single PyObject. It could be implemented as a mutable, one-element sequence, but the separate type has less overhead.
* ucnhash module has gone, xreadlines module added.Jack Jansen2001-01-253-0/+0
|
* Add bzip2 archives back to the set of generated archives; we had way tooFred Drake2001-01-251-3/+3
| | | | | | many reasonable requests to keep them around. Bump version number.
* Removed references to Python 1.5.3; that was a "tentative" number I usedFred Drake2001-01-253-9/+7
| | | | | | in the docs to indicate the next version before we decided on 1.6. Adjusted winsound.Beep() description slightly as well.
* Update link to LaTeX2HTML web site.Fred Drake2001-01-251-2/+1
|
* add extra tests to verify that co_varnames is being set up properlyJeremy Hylton2001-01-252-24/+23
| | | | | also normalize checks for syntax errors and delete commented out definition of verify.
* Fix bug reported by Ka-Ping Yee: The compiler botched parsing functionJeremy Hylton2001-01-251-12/+15
| | | | | | | | | parameters that contained both anonymous tuples and *arg or **arg. Ex: def f(a, (b, c), *d): pass Fix the symtable_params() to generate names in the right order for co_varnames slot of code object. Consider *arg and **arg before the "complex" names introduced by anonymous tuples.
* ucnhash module has gone.Jack Jansen2001-01-2512-1918/+0
|
* ucnhash module has gone, xreadlines module added.Jack Jansen2001-01-251-6/+2
|
* added a few more __all__ listsSkip Montanaro2001-01-254-8/+16
| | | | test___all__.py: fail silently in check_all if the module can't be imported
* fail more completely by deleting dbhash from sys.modules if bsddb can't beSkip Montanaro2001-01-251-1/+7
| | | | | loaded - prevents second import later from succeeding spuriously - mostly of use in regression tests where the module might get imported more than once
* Let's keep things portable to non GCC compilers, please.Sjoerd Mullender2001-01-251-22/+22
| | | | You can only use mult-line strings in C if each line ends in \.
* Clarify winsound.beep docs, in response to c.l.py beep brouhahalet.Tim Peters2001-01-251-0/+5
|
* Fix bugs introduced by rewrite (in particular, time-based initializationTim Peters2001-01-253-17/+67
| | | | | | | got broken). Also added new method .jumpahead(N). This finally gives us a semi-decent answer to how Python's RNGs can be used safely and efficiently in multithreaded programs (although it requires the user to use the new machinery!).
* Reworked random.py so that it no longer depends on, and offers all theTim Peters2001-01-253-288/+481
| | | | | | | | | | | functionality of, whrandom.py. Also closes all the "XXX" todos in random.py. New frequently-requested functions/methods getstate() and setstate(). All exported functions are now bound methods of a hidden instance. Killed all unintended exports. Updated the docs. FRED: The more I fiddle the docs, the less I understand the exact intended use of the \var, \code, \method tags. Please review critically. GUIDO: See email. I updated NEWS as if whrandom were deprecated; I think it should be.
* A \begin{funcdesc} was closed with an \end{methoddesc}.Barry Warsaw2001-01-251-1/+1
|
* Fixed a bug where \& was needed.Barry Warsaw2001-01-251-1/+1
|
* Provide a much better (and complete!) description of the lockf()Barry Warsaw2001-01-251-4/+38
| | | | function, based on an eyeballing of the code.
* lockf_doc: a much better description of the lockf() function, based onBarry Warsaw2001-01-251-4/+23
| | | | an eyeballing of the code.
* Supply long-missing docs for random.seed(). Extensive rewrite of moduleTim Peters2001-01-241-21/+52
| | | | | | intro docs. *************** Fred: check my LaTeX! Also, the docs for whrandom should *************** be moved into Obsolete Modules.
* Check the Py_TPFLAGS_HAVE_RICHCOMPARE flag before using theGuido van Rossum2001-01-241-7/+9
| | | | | tp_richcompare field! (Hopefully this will make Python 2.1 binary compatible with certain Zope extensions. :-)
* Add a flag to indicate the presence of the tp_richcompare field, andGuido van Rossum2001-01-241-2/+7
| | | | add it to the default flags.
* Fix the test output, now that escapes in repr() of string and UnicodeGuido van Rossum2001-01-242-6/+6
| | | | are different (Ping didn't test this).
* Fix the test output, now that escapes in repr() of string and UnicodeGuido van Rossum2001-01-241-3/+3
| | | | are different (Ping couldn't test this).
* The array type was missing the Py_TPFLAGS_DEFAULT initializer for theGuido van Rossum2001-01-241-1/+1
| | | | | tp_flags. This will become important when I introduce Py_TPFLAGS_HAVE_RICHCOMPARE (as I should have!).
* New asynchat.py from Sam Rushing: this foregoes using the regex moduleAndrew M. Kuchling2001-01-241-36/+12
| | | | | to find the prefix of strings, thus removing a warning, and simply uses straightforward string slicing.
* Fix an obvious usage nit I should have caught myself on the previousFred Drake2001-01-241-1/+1
| | | | change to this file. Thanks, /F!
* Update the build instructions for flat makefile.Neil Schemenauer2001-01-241-18/+14
|
* The usual.Neil Schemenauer2001-01-241-434/+610
|
* - build now happens in toplevel directory, add subdir paths to filenamesNeil Schemenauer2001-01-241-70/+69
| | | | | | | | | - change EXE to EXTEXT, there is an autoconf macro for it - use PROG_INSTALL macro rather than always using install-sh - add option to disable signal module (simplifies the makefile) - create subdirs for object files (when building out of src dir) - don't generate subdir makefiles - generate "boot" makefile
* Show '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.Ka-Ping Yee2001-01-2413-205/+221
| | | | Switch from octal escapes to hex escapes for other nonprintable characters.
* Patch from Andrew to properly set module source directory.Neil Schemenauer2001-01-241-2/+2
|