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
Fred Drake
591dd8f620
Update information about __del__() & reference cycles for CPython.
...
This partially fixes SF bug #492619 .
Fix a typo & use the new notice environment instead of (ab)using the \note
and \warning macros.
2001-12-14 22:52:41 +00:00
Fred Drake
e31e9cebc0
Document generators and the yield statement, avoiding implementation details.
2001-12-11 21:10:08 +00:00
Fred Drake
f9d580346b
Add change notes where im_class is discussed, since the exact meaning changes
...
with Python 2.2.
2001-12-07 23:13:53 +00:00
Guido van Rossum
b62f0e1a7b
Correct the description of im_class. (Fred, this is changed in 2.2.
...
Should this be labeled as changed? How?)
2001-12-07 22:03:18 +00:00
Fred Drake
3570551d6f
Remove most references to __members__ and __methods__, leaving only one pair
...
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420 .
2001-12-03 17:32:27 +00:00
Fred Drake
c37b65ee10
Clean up some markup cruft. A number of the macros that take no
...
parameters (like \UNIX) are commonly entered using an empty group to
separate the markup from a following inter-word space; this is not
needed when the next character is punctuation, or the markup is the
last thing in the enclosing group. These cases were marked
inconsistently; the empty group is now *only* used when needed.
2001-11-28 07:26:15 +00:00
Fred Drake
0aa811c527
Use the \note and \warning macros where appropriate.
2001-10-20 04:24:09 +00:00
Fred Drake
73921b0eec
Refer to the objects which define __len__(), __*item__(), and __iter__()
...
as container objects rather than as mapping objects (in the index entries).
Change the section heading and intro sentence to be a little more general,
since that's how things have actually evolved.
2001-10-01 16:32:13 +00:00
Fred Drake
18d8d5a708
Fix minor usage and consistency nits.
2001-09-18 17:58:20 +00:00
Fred Drake
ed5a7ca5ee
Work around a LaTeX2HTML bug that caused the "m" in "mutable" to be dropped
...
in one place.
2001-09-10 15:16:08 +00:00
Fred Drake
3e2aca48bd
Add information about __floordiv__() and __truediv__() methods for
...
implementing numeric objects in Python.
2001-08-14 20:28:08 +00:00
Fred Drake
8dd6ffd0ec
User-defined methods *can* contain things other than user-defined functions
...
as the callable, so use more flexible language.
2001-08-02 21:34:53 +00:00
Fred Drake
044bb4d22a
Explain that __init__() methods do not get to return values.
2001-08-02 15:53:05 +00:00
Fred Drake
6e5e1d924c
Minor change to match the style guide.
2001-07-14 02:12:27 +00:00
Fred Drake
2829f1cf99
Fix a very minor (but annoying when looking for things!) markup nit.
2001-06-23 05:27:20 +00:00
Fred Drake
597bc1d46f
Bring the notes on the relationship between __cmp__(), __eq__(), and
...
__hash__() up to date (re: use of objects which define these methods
as dictionary keys).
This closes SF bug #427698 .
2001-05-29 16:02:35 +00:00
Fred Drake
b3384d3555
Make sure we include all of Python's numeric types in the data model
...
description, so that the introduction of complex is not a surprise.
This closes SF bug #423429 .
2001-05-14 16:04:22 +00:00
Guido van Rossum
0dbb4fba4c
Implement, test and document "key in dict" and "key not in dict".
...
I know some people don't like this -- if it's really controversial,
I'll take it out again. (If it's only Alex Martelli who doesn't like
it, that doesn't count as "real controversial" though. :-)
That's why this is a separate checkin from the iterators stuff I'm
about to check in next.
2001-04-20 16:50:40 +00:00
Fred Drake
fb8ffe6b5e
Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping.
...
Wrap some long lines and fix some markup nits.
2001-04-13 15:54:41 +00:00
Jeremy Hylton
aa90adcfb9
Add nested scopes spec to appendix.
...
Add new opcodes LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE to
docs for dis module.
Add docs for new function and code members in Sec. 3 of ref manual.
They're present regardless of whether nested scopes are used.
Remove description of default argument hack from Sec. 7 of the ref
manual and refer the reader to the appendix.
2001-03-23 17:23:50 +00:00
Barry Warsaw
7a5e80e801
Updates to describe function attributes.
2001-02-27 03:36:30 +00:00
Fred Drake
230d17d0d1
Sequence indexes are non-negative, not natural (0 is not a natural number).
...
Reported by Daniel May <mayds@ecn.purdue.edu>.
De-tabified everywhere.
2001-02-22 21:28:04 +00:00
Fred Drake
c8e8281fb6
Updated note about collection of cyclic garbage, based on comments from
...
Chris Ryland.
2001-01-22 17:46:18 +00:00
Guido van Rossum
ab782dd6cc
Document rich comparisons.
2001-01-18 15:17:06 +00:00
Fred Drake
445f832060
__rcmp__() description: Changed to indicate that this is no longer
...
supported as of Python 2.1. We still need to
have an entry for this since it is reasonable
for users to want to understand existing code.
This closes SF bug #122715 .
2001-01-04 15:11:48 +00:00
Neil Schemenauer
48c2eb9165
Document the NotImplemented object.
2001-01-04 01:25:50 +00:00
Andrew M. Kuchling
68abe832b9
Fix typo
2000-12-19 14:09:21 +00:00
Guido van Rossum
035f7e88c8
Clarify __repr__ and __str__.
2000-12-19 04:18:13 +00:00
Thomas Wouters
dc90cc2b15
Additional docs for __iadd__ and family, closing SF bug #117178 and SF patch
...
#102169 .
2000-12-11 23:11:51 +00:00
Fred Drake
0c47559352
Added a note that objects which emulate built-in types should only
...
implement as many of the relevant methods as make sense for the particular
information being modelled.
2000-12-07 04:49:34 +00:00
Fred Drake
f89259786a
Denis S. Otkidach <ods@users.sourceforge.net>:
...
Show how code can be written to handle __getslice__ & friends in a way that
is compatible with pre-2.0 versions of Python while still working with the
"new" way of handling slicing.
Additional explanation added by Fred Drake.
This closes SourceForge patch #101388 .
2000-09-21 22:27:16 +00:00
Fred Drake
31575ce817
Note that __getitem__() may receive a slice object as the index;
...
reported by Detlef Lannert <lannert@uni-duesseldorf.de>.
2000-09-21 05:28:26 +00:00
Fred Drake
8d27f898b2
Moshe Zadka <mzadka@geocities.com>:
...
Document the __contains__() method.
(Patch slightly modified by FLD.)
This closes SourceForge patch #101387 .
2000-09-19 18:21:25 +00:00
Thomas Wouters
12bba852a9
Rough and incomplete documentation on augmented assignment, which follows
...
shortly. Markup also needs checking.
2000-08-24 20:06:04 +00:00
Fred Drake
a00738259f
Adjust the way __getslice__() is marked as deprecated; this will also
...
stand out more.
2000-08-18 02:42:14 +00:00
Thomas Wouters
1d75a79c00
Apply SF patch #101029 : call __getitem__ with a proper slice object if there
...
is no __getslice__ available. Also does the same for C extension types.
Includes rudimentary documentation (it could use a cross reference to the
section on slice objects, I couldn't figure out how to do that) and a test
suite for all Python __hooks__ I could think of, including the new
behaviour.
2000-08-17 22:37:32 +00:00
Thomas Wouters
f9b526dbfd
More of Rob W. W. Hooft's spelling fixes. The only ones left now are the
...
distutils patches, which I'll leave to the distutils maintainers.
Tip: review the patch like this:
grep "^[\!+-] " <patchfile>
To get a quick and easy way to review the actual changes. Most of the
changes are single-line ones, anyway.
2000-07-16 19:05:38 +00:00
Fred Drake
91826ed2a9
Improve the descriptions of expected exceptions for __getitem__(),
...
__setitem__(), and __delitem__(). Based on related comments from
Barry Warsaw.
2000-07-13 04:57:58 +00:00
Fred Drake
35c09f2e51
Revise the description of when functions retrieved from class instances
...
are and are not turned into bound methods; some confusion was noted by
Andrew Dalke.
In particular, it has to be noted that functions located on the class
instance are not turned into any sort of method, only those which are
found via the underlying class.
2000-06-28 20:15:47 +00:00
Fred Drake
e57a11441e
Fix markup error that hid a tilde character; reported long ago by
...
Carl Feynman <carlf@abinitio.com>.
2000-06-15 20:07:25 +00:00
Fred Drake
8b3ce9e099
But don't do the funny \UNICODE macro; we're trying to get away from
...
those markups! <with-mixed-feelings>
2000-04-06 14:00:14 +00:00
Fred Drake
f0aff8e759
Patch from Marc-Andre Lemburg <mal@lemburg.com>:
...
Added Unicode type to the language reference.
2000-04-06 13:57:21 +00:00
Fred Drake
e15956b465
Merged changes from the 1.5.2p2 release.
2000-04-03 04:51:13 +00:00
Fred Drake
e15eb35fd0
Use \citetitle as appropriate.
1999-11-10 16:13:25 +00:00
Fred Drake
b894370f6a
Fixed some index entries.
...
In the __coerce__ description, None should be returned if the
conversion is *impossible*, not *possible*. Reported by Robert Kern
<kernr@ncifcrf.gov>.
1999-05-10 13:43:22 +00:00
Fred Drake
8cdee961bf
Dictionaries are created using the "{...}" notation, not the "..."
...
notation. Problem reported by Magnus L. Hetland <mlh@idt.ntnu.no>.
1999-02-23 18:50:38 +00:00
Guido van Rossum
264bd59221
1. Clarify that immutability isn't entirely the same as unchangeable
...
value (because of immutable containers containing mutable objects).
2. Document that func_code, func_defaults and func_doc / __doc__ are
now writable.
1999-02-23 16:40:55 +00:00
Fred Drake
15988fdbbb
Documented __complex__(), made sure all the discipline names hit the
...
index.
1999-02-12 18:14:57 +00:00
Fred Drake
ae3e574170
"numberic" --> "numeric", two places
1999-01-28 23:21:49 +00:00