Jeremy Hylton
1824b59e89
Update programmer's note on nested functions.
2002-04-01 21:30:15 +00:00
Jeremy Hylton
f3255c8540
Reword explanation of global statement since an undeclared global is a
...
free variable and is subject to those rules.
2002-04-01 21:25:32 +00:00
Jeremy Hylton
f0c1f1badb
Note the sole case in which the ban on "from ... import *" within a
...
function is enforced.
2002-04-01 21:19:44 +00:00
Jeremy Hylton
15b68976da
Remove the following restriction:
...
Names bound by import statements may not occur in global
statements in the same scope.
Why not?
2002-04-01 21:18:02 +00:00
Jeremy Hylton
d09ed68aeb
Note that it is illegal to delete a cell variable.
...
Note that deleteing an unbound local will raise a NameError.
2002-04-01 21:15:14 +00:00
Jeremy Hylton
2225add242
Given lambda its own section, instead of burying it in boolean operators.
2002-04-01 21:05:21 +00:00
Jeremy Hylton
53ed917d3a
Update / simplify Identifiers section for nested scopes.
...
How do I create a cross reference to section 4.1?
2002-04-01 20:52:24 +00:00
Jeremy Hylton
e7d5773ed0
Update docs for nested scopes.
...
Replace section 4.1 with section A.3.
The new section 4.1 is titled "Naming and binding." It includes the
text of section A.3 augmented with some of the detailed text from the
old section 4.1.
The \dfn, \index stuff is probably wrong, but I tried.
Also update other parts of appendix A to mention that nested scopes
and generators are standard features.
2002-04-01 20:38:01 +00:00
Fred Drake
f54519d9e4
Update to push the docs to python.org instead of python.sf.net.
2002-04-01 20:15:05 +00:00
Tim Peters
6169f09d64
Fixed errors in two comments.
2002-04-01 20:12:59 +00:00
Andrew M. Kuchling
f4dd65db1d
Copy section on generators from the 2.2 document with a bit of rewriting
...
Add an item
2002-04-01 19:28:09 +00:00
Tim Peters
338e010b45
Restructured my pool-management overview in terms of the three
...
possible pool states. I think it's much clearer now.
Added a new long overdue block-management overview comment block.
I believe the comments are in good shape now.
Added two comments about possible small optimizations (one getting rid
of runtime multiplications at the cost of a new pool_header member; the
other getting rid of runtime divisions and the pool_header capacity
member, at the cost of a static const vector of 32 uints).
2002-04-01 19:23:44 +00:00
Andrew M. Kuchling
9da3efd120
Mention 2.2.1 in intro and in bug/patch counts
...
Fix two typos spotted by Joonas Paalasmaa
2002-04-01 19:22:34 +00:00
Neal Norwitz
05c09d08f9
Format strings (tuples,) appropriately
2002-04-01 19:01:39 +00:00
Neal Norwitz
28bb572ab4
Use attributes appropriately
2002-04-01 19:00:50 +00:00
Neal Norwitz
b1295da59e
There is no TestError, use TestFailed appropriately
2002-04-01 18:59:20 +00:00
Jeremy Hylton
8392f36579
Update documentation of code objects.
...
Split the description of co_flags into two paragraphs. The first
describes the flags that are used for non-future purposes, where
CO_GENERATOR was added. The second describes __future__'s use of
co_flags and mentions the only one currently meaningful,
CO_FUTURE_DIVISION.
2002-04-01 18:53:36 +00:00
Fred Drake
c9319b37a5
Minor adjustments.
2002-04-01 18:49:45 +00:00
Jeremy Hylton
26c49b66bb
Small fixes for description of function attributes.
...
func_closure is a readonly attribute.
Add \ttindex{} for func_closure.
Remove discussion of func_closure specific to 2.1.
2002-04-01 17:58:39 +00:00
Martin v. Löwis
2f6ef4c630
Reindent. Break long lines. Move comments before the statements.
2002-04-01 17:40:08 +00:00
Fred Drake
4baedc1d9b
Use the PyModule_Add*() APIs instead of manipulating the module dict
...
directly.
2002-04-01 14:53:37 +00:00
Fred Drake
9bb7432114
Remove all but one use of the module dict.
2002-04-01 14:49:59 +00:00
Fred Drake
d63e504d33
Remove unused variable and call to PyModule_GetDict().
2002-04-01 14:30:50 +00:00
Fred Drake
acee69faf8
Switch to using METH_NOARGS where possible.
...
Convert to use PyModule_*() instead of manipulating the module dict directly.
2002-04-01 14:28:58 +00:00
Martin v. Löwis
43c9d8ad23
Remove UNLESS.
2002-04-01 12:34:33 +00:00
Tim Peters
7ccfadf3a8
New PYMALLOC_DEBUG function void _PyMalloc_DebugDumpStats(void).
...
This displays stats about the # of arenas, pools, blocks and bytes, to
stderr, both used and reserved but unused.
CAUTION: Because PYMALLOC_DEBUG is on, the debug malloc routine adds
16 bytes to each request. This makes each block appear two size classes
higher than it would be if PYMALLOC_DEBUG weren't on.
So far, playing with this confirms the obvious: there's a lot of activity
in the "small dict" size class, but nothing in the core makes any use of
the 8-byte or 16-byte classes.
2002-04-01 06:04:21 +00:00
Tim Peters
de14a30d1d
We expect to skip the new test_mpz on Windows.
2002-04-01 05:04:46 +00:00
Fred Drake
f4e3484692
Use the PyModule_*() API instead of manipulating the module dictionary
...
directly.
2002-04-01 03:45:06 +00:00
Neal Norwitz
7829335763
Get rid of another use of PyArg_Parse()
2002-04-01 01:41:20 +00:00
Neal Norwitz
02098fa56b
Get rid of all METH_OLDARGS & PyArg_Parse.
...
Fix floating point exception if mpz.powm(10, 1, 0) (modulus == 0).
Add a test.
2002-04-01 01:37:14 +00:00
Tim Peters
496563a514
Remove some now-obsolete generator future statements.
...
I left the email pkg alone; I'm not sure how Barry would like to handle
that.
2002-04-01 00:28:59 +00:00
Neal Norwitz
62f5a9d6c2
Convert file.readinto() to stop using METH_OLDARGS & PyArg_Parse.
...
Add test for file.readinto().
2002-04-01 00:09:00 +00:00
Guido van Rossum
b955d6c41e
Hopeful fix for SF bug 503031: urllib.py: open_http() host problem.
...
I really can't test this, but from reading the discussion in that bug
report, it's likely that this works. It may also close a whole bunch
of other bug reports related to urllib and proxies on Windows, but who
knows.
2002-03-31 23:38:48 +00:00
Neal Norwitz
dfd59e039a
mpz_float() only takes one parameter now
2002-03-31 22:02:37 +00:00
Jack Jansen
ff773eba36
Added a "run with commandline Python" flag. Works in MachoPython, should work
...
in OSX MacPython (untested), and should be disabled/removed in OS9 (but
that doesn't happen yet).
2002-03-31 22:01:33 +00:00
Neal Norwitz
767f83539d
Get rid of warnings due to changing to METH_NOARGS
2002-03-31 16:13:39 +00:00
Neal Norwitz
93c1e23667
Use METH_VARARGS rather than METH_OLDARGS implicitly (args are ignored)
2002-03-31 16:06:11 +00:00
Neal Norwitz
28faa1bf28
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
...
Use METH_OLDARGS explicitly rather than implicitly.
2002-03-31 15:56:56 +00:00
Neal Norwitz
bb2769f580
Revert use of METH_OLDARGS (use 0) to support 1.5.2
2002-03-31 15:46:00 +00:00
Neal Norwitz
b82d34f91e
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
...
Please review for correctness.
2002-03-31 15:43:28 +00:00
Neal Norwitz
ba3a16c6c3
Remove METH_OLDARGS:
...
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Please review. All tests pass, but some modules don't have tests.
I spot checked various functions to try to make sure nothing broke.
2002-03-31 15:27:00 +00:00
Neal Norwitz
50905b557b
Convert from using METH_OLDARGS to METH_NOARGS.
...
These should be safe.
2002-03-31 14:57:24 +00:00
Neal Norwitz
01b2694acb
Fix whitespace
2002-03-31 14:55:17 +00:00
Neal Norwitz
b049325e92
Use symbolic METH_VARARGS/METH_OLDARGS instead of 1/0 for ml_flags
2002-03-31 14:44:22 +00:00
Neal Norwitz
031829d3ef
Use symbolic METH_VARARGS instead of 1 for ml_flags
2002-03-31 14:37:44 +00:00
Neal Norwitz
93cf79fde4
Use docstrings for exception classes
2002-03-31 14:06:41 +00:00
Neal Norwitz
f74e46cf47
Derive exception classes from Exception
2002-03-31 13:59:18 +00:00
Neal Norwitz
27a353020b
Stop using string exceptions
2002-03-31 13:58:20 +00:00
Tim Peters
57b17ad6ae
Add one more assert that indirectly interlocking conditions are consistent
...
with each other.
2002-03-31 02:59:48 +00:00
Tim Peters
4c5be0ce09
Fixed an error in a new assert.
2002-03-31 02:52:29 +00:00