Commit Graph

3929 Commits

Author SHA1 Message Date
Fred Drake 88382696f4 Update a "Programmer's note" about lambda forms and scoping to reflect
the availability of nested scoping in Python 2.1 and 2.2.
2001-06-05 02:17:02 +00:00
Skip Montanaro b9d973dac5 is -> if in rename description 2001-06-04 15:31:17 +00:00
Fred Drake 00d0cb6ec3 Explained more differences between PyList_SetItem() and PyList_SET_ITEM().
In particular, the affect on existing list content was not sufficiently
explained.

This closes SF bug #429554.
2001-06-03 03:12:57 +00:00
Fred Drake 81e142b907 Document os.getenv().
This closes SF bug #429059.
2001-05-31 20:27:46 +00:00
Fred Drake c19f39272e Some general cleanup of the threading module documentation, including
fixing the reference to Thread.getDeamon() (should be isDaemon()).

This closes SF bug #429070.
2001-05-31 20:24:07 +00:00
Fred Drake 6cba3d0e64 Added entry for HTMLParser documentation. 2001-05-30 04:59:50 +00:00
Fred Drake 3b755d43ac Michel Pelletier <michel@digicool.com>:
Documentation for the HTMLParser module, with small changes by FLD.
2001-05-30 04:59:00 +00:00
Fred Drake 9a374186fc New solution to the "Someone stuck a colon in that filename!" problem:
Allow colons in the labels used for internal references, but do not
expose them when generating filename.
2001-05-29 19:53:46 +00:00
Fred Drake 96a2a80065 Users of PySequence_GET_FAST() should get the length of the sequence using
PySequence_Size(), not PyObject_Size(): the later considers the mapping
methods as well as the sequence methods, which is not needed here.  Either
should be equally fast in this case, but PySequence_Size() offers a better
conceptual match.
2001-05-29 18:51:41 +00:00
Fred Drake dc9e7e42c8 readlink() description: Added note that the return value may be either
absolute or relative.

remove(), rename() descriptions:  Give more information about the cross-
    platform behavior of these functions, so single-platform developers
    can be aware of the potential issues when writing portable code.

This closes SF patch #426598.
2001-05-29 18:13:06 +00:00
Fred Drake 964c074a62 Hack to make this play nicer with *old* versions of Python: os.path.abspath()
was not available in Python 1.5.1.  (Yes, a user actually tried to use this
with that version of Python!)
2001-05-29 16:10:07 +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 b9879e1020 Fix typo reported in SF bug #427783. 2001-05-29 15:44:27 +00:00
Fred Drake c80d4dd695 The parameter to the listen() method is not optional, but was marked as
optional in the documentation.

This closes SF bug #427985.
2001-05-29 15:37:45 +00:00
Fred Drake b2625eb10e Removed information on the old third parameter to _PyTuple_Resize().
Added information on PyIter_Check(), PyIter_Next(),
PyObject_Unicode(), PyString_AsDecodedObject(),
PyString_AsEncodedObject(), and PyThreadState_GetDict().
2001-05-29 15:34:06 +00:00
Fred Drake 404ac97207 If the input line does not contain enough fields, raise a meaningful
error.
2001-05-29 15:25:51 +00:00
Fred Drake fac312ff88 Do not start API descriptions with "Does the same, but ..." -- actually
state *which* other function the current one is like, even if the
descriptions are adjacent.

Revise the _PyTuple_Resize() description to reflect the removal of the
third parameter.
2001-05-29 15:13:00 +00:00
Fred Drake 56a71eee65 Add a version annotation for splitdrive(); old, but as long as I managed
to end up with the information, it is better recorded than lost.
2001-05-25 16:21:00 +00:00
Fred Drake c6d8f8d2ac Add descriptions of {}.iteritems(), {}.iterkeys(), and {}.itervalues()
in the table of mapping object operations.  Re-numbered the list of
notes to reflect the move of the "Added in version 2.2." note to the list
of notes instead of being inserted into the last column of the table.
2001-05-25 04:24:37 +00:00
Fred Drake 98cfab6523 One more update related to the new get() and setdefault() methods on the
Message object.
2001-05-22 22:00:40 +00:00
Fred Drake 6b4593e338 Update to add get() and setdefault() as supported mapping operations, and
add a list of the mapping methods which are not supported (per Barry's
comments).
2001-05-22 15:12:46 +00:00
Fred Drake 706314909b Add some clarifications about the mapping interface presented by
rfc822.Message objects, based on comments from Barry.
2001-05-22 14:36:30 +00:00
Tim Peters bd695a716d Changed all the examples with ugly platform-dependent float output to use
numbers that display nicely after repr().  From much doctest experience
with the same trick, I believe people find examples with simple fractions
easier to understand too:  they can usually check the results in their
head, and so feel confident about what they're seeing.  Not even I get a
warm feeling from a result that looks like 70330.345024097141 ...
2001-05-22 06:54:14 +00:00
Fred Drake 1400baa5d6 Add a "See also" section with useful links. More should be added giving
pointers to information about the other mailbox formats; if anyone can
provide the information needed, please let me know!
2001-05-21 21:23:01 +00:00
Fred Drake 8b0b8409ae Update output to reflect additional precision produced by the repr() of
floating point numbers in an interactive example.


Added comment to help explain control flow in the example code showing
how to check if a number is prime.

This closes SF bugs 419434 and 424552.
2001-05-21 16:55:39 +00:00
Fred Drake 24e621918b Add documentation for Py_Main() and PyThreadState_GetDict(). 2001-05-21 15:56:55 +00:00
Fred Drake fc43d00c17 Typo: "that" --> "than"
This closes SF bug #425320.
2001-05-21 15:03:35 +00:00
Fred Drake e9719fe1a7 Fix bug in smtplib example: the prompt said to end the message with ^D,
but doing so raised EOFError.  This makes it work as advertised and
converts to string methods where reasonable.

This closes SF bug #424776.
2001-05-20 12:26:04 +00:00
Fred Drake 09daff4596 Get Aahz listed correctly using his legal/professional name. 2001-05-20 05:29:01 +00:00
Andrew M. Kuchling 3b923fcff5 Add another item 2001-05-19 19:35:46 +00:00
Fred Drake c0dac1a58c Beef up the unicode() description a bit, based on material from AMK's
"What's New in Python ..." documents.
2001-05-15 15:27:53 +00:00
Marc-André Lemburg 2d9204199f This patch changes the way the string .encode() method works slightly
and introduces a new method .decode().

The major change is that strg.encode() will no longer try to convert
Unicode returns from the codec into a string, but instead pass along
the Unicode object as-is. The same is now true for all other codec
return types. The underlying C APIs were changed accordingly.

Note that even though this does have the potential of breaking
existing code, the chances are low since conversion from Unicode
previously took place using the default encoding which is normally
set to ASCII rendering this auto-conversion mechanism useless for
most Unicode encodings.

The good news is that you can now use .encode() and .decode() with
much greater ease and that the door was opened for better accessibility
of the builtin codecs.

As demonstration of the new feature, the patch includes a few new
codecs which allow string to string encoding and decoding (rot13,
hex, zip, uu, base64).

Written by Marc-Andre Lemburg. Copyright assigned to the PSF.
2001-05-15 12:00:02 +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
Fred Drake ba7e2c8a27 Add some text to make the dircmp object section more readable, and move
some stuff around.
2001-05-11 17:01:32 +00:00
Fred Drake 886f113ba9 --sigh--
Finish the last set of changes to these files so the conversion does not
break.
2001-05-11 15:49:19 +00:00
Fred Drake 47852467f5 Markup adjustments to avoid getting junk in the index. 2001-05-11 15:46:45 +00:00
Fred Drake 96d7a70630 Replace "\begin{classdesc}{SomeClass}{\unspecified}" with
"\begin{classdesc*}{SomeClass}" -- the rendering of \unspecified was
identical to \moreargs, so this helps clarify things just a little.
2001-05-11 01:08:13 +00:00
Fred Drake 9f2376de7a Document the new classdesc* environment, and the previously undocumented
excclassdesc environment.
2001-05-11 01:01:12 +00:00
Fred Drake 06a01e84b9 Define a new environment, classdesc*, which can be used to document a
class without providing any information about the constructor.  This
should be used for classes which only exist to act as containers rather
than as factories for instances.
2001-05-11 01:00:30 +00:00
Fred Drake 986badae1e Write a better synopsis for the Scrap module, and provide a link to
useful documentation on the Scrap Manager.
2001-05-10 22:37:38 +00:00
Fred Drake 0eeca6342f Actually include a synopsis line for the ColorPicker module. 2001-05-10 22:36:13 +00:00
Fred Drake e7ec1efe50 Fix typo in weakref.proxy() documentation.
This closes SF bug #423087.
2001-05-10 17:22:17 +00:00
Fred Drake 791c351b3d Update example to no longer use the FCNTL module. 2001-05-10 15:57:17 +00:00
Fred Drake 7c116d7acb Fix typo reported by David Goodger. This closes SF patch #422383. 2001-05-10 15:09:36 +00:00
Fred Drake e9735ac215 Remove all mentions of the strop module -- it has been pronounced Evil.
(The string "strop" is found in the rexec documentation, but that should
not be changed until strop is actually removed or rexec no longer allows
it.)
2001-05-10 15:05:03 +00:00
Fred Drake d0de57cfbb Update the fcntl module documentation. 2001-05-09 21:09:57 +00:00
Fred Drake bda3a59a93 Itamar Shtull-Trauring <python@itamarst.org>:
Updates zipfile.ZipFile docs to mention the fact that you can create a
ZipFile instance from an arbitrary file-like object.

This closes patch #418011.
2001-05-09 19:57:37 +00:00
Fred Drake b8ac0096b2 Fix the operator precedence table: exponentiation binds tighter than
negation.

This closes SF bug #421999.
2001-05-09 16:51:49 +00:00
Fred Drake 251ebe7d30 Remove items that have been done or are being tracked in the SourceForge
bug tracker.
2001-05-09 16:43:47 +00:00
Fred Drake 283b352d48 Update the directory names to match changes at SourceForge. 2001-05-09 16:33:34 +00:00
Fred Drake c116b82b77 Work around limitations of the module synopsis table generation to avoid
leaking LaTeX2HTML's internal string munging.

This fixes SF bug #420399.
2001-05-09 15:50:17 +00:00
Fred Drake caa79a9ee4 Minor adjustments to HTML for the module synopsis tables. 2001-05-09 15:32:14 +00:00
Fred Drake af922187ae Job.build_html(): Be more robust in ensuring about.html exists; copying
the right HTML file to the name about.html is needed even if the
    --numeric option was not given -- some other name may have been
    assigned due to some non-determinism in the algorithm use to perform
    name allocation.  ;-(

This closes the "About..." portion of SF bug #420216.
2001-05-09 04:03:16 +00:00
Fred Drake a7c9ac6544 There is no IMAP class in the imaplib module; the class is IMAP4.
There is no imap module; refer to imaplib instead, since it exists.
Move the "See Also:" section in front of the sub-sections, for
consistency with other portions of the library reference.

This closes the library reference portion of SF bug #420216.
2001-05-09 03:49:48 +00:00
Fred Drake 1ef24e1b30 Note that when inplace=1 existing backup files will be removed silently.
Closes SF bug #420230.
2001-05-09 03:24:55 +00:00
Fred Drake a6140be7b3 Michael Hudson <mwh21@cam.ac.uk>:
Documentation update to reflect changes to the termios module (noting
that the termios functions can take a file object as well as a file
descriptor).

This closes the documentation portion of SF patch #417081.
2001-05-08 05:37:52 +00:00
Fred Drake a8e0827614 Hmm... better add a version annotation for the Iterator Protocol section. 2001-05-07 17:47:07 +00:00
Fred Drake dbcaeda79a Added documentation for PyIter_Check() and PyIter_Next().
Wrapped a long line.
2001-05-07 17:42:18 +00:00
Andrew M. Kuchling a8defaae04 Skeletal version; I'm checking this in now so I can keep a list of changes,
but don't plan on actually writing any text until, ooh, say, July or
   thereabouts.
2001-05-05 16:37:29 +00:00
Fred Drake f42cc45f1b The general iteration support is part of 2.2, not 2.1 -- fixed the version
annotations!

Also fixed a typo noted by Neil S.
2001-05-03 04:39:10 +00:00
Fred Drake 9cfe1824c2 Add documentation for the StopIteration exception. 2001-05-03 04:30:45 +00:00
Fred Drake 287c4cb43a State that Mailbox objects are iterator objects. 2001-05-02 20:22:12 +00:00
Fred Drake eacdec6b38 Update the filter() and list() descriptions to include information about
the support for containers and iteration.
2001-05-02 20:19:19 +00:00
Fred Drake 93656e76f9 Added section describing the iterator protocol. 2001-05-02 20:18:03 +00:00
Marc-André Lemburg 6f15e5796e Added new parser markers 'et' and 'et#' which do not recode string
objects but instead assume that they use the requested encoding.

This is needed on Windows to enable opening files by passing in
Unicode file names.
2001-05-02 17:16:16 +00:00
Fred Drake 9188b2194a Correct two floating-point representations printed by the interpreter in
interactive examples.  Error noted by Dinu Gherman.
2001-04-25 21:03:20 +00:00
Marc-André Lemburg 8155e0e541 This patch originated from an idea by Martin v. Loewis who submitted a
patch for sharing single character Unicode objects.

Martin's patch had to be reworked in a number of ways to take Unicode
resizing into consideration as well. Here's what the updated patch
implements:

* Single character Unicode strings in the Latin-1 range are shared
  (not only ASCII chars as in Martin's original patch).

* The ASCII and Latin-1 codecs make use of this optimization,
  providing a noticable speedup for single character strings. Most
  Unicode methods can use the optimization as well (by virtue
  of using PyUnicode_FromUnicode()).

* Some code cleanup was done (replacing memcpy with Py_UNICODE_COPY)

* The PyUnicode_Resize() can now also handle the case of resizing
  unicode_empty which previously resulted in an error.

* Modified the internal API _PyUnicode_Resize() and
  the public PyUnicode_Resize() API to handle references to
  shared objects correctly. The _PyUnicode_Resize() signature
  changed due to this.

* Callers of PyUnicode_FromUnicode() may now only modify the Unicode
  object contents of the returned object in case they called the API
  with NULL as content template.

Note that even though this patch passes the regression tests, there
may still be subtle bugs in the sharing code.
2001-04-23 14:44:21 +00:00
Guido van Rossum 8b3d6ca3df At the suggestion of Peter Funk, document 'key in dict' and 'key not
in dict' after has_key(), with a \versionadded{2.2} note.
2001-04-23 13:22:59 +00:00
Fred Drake 34b48e844e Update publish-to-SourceForge scripts to automatically determine if the
branch is the head (development) branch or a maintenance brach, and use
the appropriate target directory for each.
2001-04-22 06:20:31 +00:00
Fred Drake 82f93c693d Only document <file>.xreadlines() once; added version annotation.
This closes SF bug #417943.
2001-04-22 01:56:51 +00:00
Fred Drake e99b97e58a encode(): Handle Latin-1 input characters better. 2001-04-21 06:01:53 +00:00
Fred Drake bda05564de Add support for <memberline/> (needs markup improvement!).
Update <versionadded/> to recent addition of optional explanatory text;
make the explanation text take the same attribute name for both
<versionadded/> and <versionchanged/>.
2001-04-21 06:00:51 +00:00
Fred Drake 4cacec5393 Fix a number of minor markup errors. 2001-04-21 05:56:06 +00:00
Fred Drake 056a71da76 The (fairly recent) \textasciicircum is not supported by LaTeX2HTML; add
support for it here.
2001-04-21 05:48:07 +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 1aec3a16f3 Add versioning notes: many of the signatures changed to allow the time
used to be omitted (meaning use the current time) as of Python 2.1.
Users who need cross-version portability need to know things like this.
2001-04-19 04:55:23 +00:00
Fred Drake bc524c4e9f Cut-&-paste-o noted by Wolfgang Teschner: decompressobj() returns
*DE*compression objects, not compression objects!
2001-04-18 20:16:51 +00:00
Fred Drake 895aa9da4c Suggestion from Keith Briggs: refer to RE objects consistently instead of
introducing a new term ("regex") without defining it.
2001-04-18 17:26:20 +00:00
Fred Drake f3848322ff Sync version number with the current CVS version.
(Note that the docs are also being maintained on the 2.1.1 maintenance
 branch, so users interested only in corrections and clarifications
 can get that.)
2001-04-18 05:22:24 +00:00
Fred Drake 3151f44d49 Add description of the "explanation" optional parameter added to the
\versionadded macro.

Note: this should not be merged into the 2.1 maintenance branch.
2001-04-18 05:19:06 +00:00
Fred Drake 4c6f17a537 Make a number of small clarifications and correct a whole bunch of typos,
all reported by Bruce Smith.
2001-04-18 05:12:47 +00:00
Fred Drake 635a7cfcbb Sync version number with the current CVS version.
(Note that the docs are also being maintained on the 2.1.1 maintenance
 branch, so users interested only in corrections and clarifications
 can get that.)
2001-04-18 05:02:01 +00:00
Fred Drake 293f77af6f Add note about the version in which GetoptError was added -- this can
bite people interested in 1.5.2 compatibility.
2001-04-18 03:18:57 +00:00
Fred Drake c2b29d0fee Added support for optional explanation parameter to the \versionadded
macro.

Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most
of the work in a helper function, with the do_cmd_*() wrappers just supplying
a portion of the replacement text.
2001-04-18 03:11:04 +00:00
Fred Drake fdfb05bb0b \versionadded: Add support for including an explanatory note along with
the versioning information, similar to \versionchanged.
2001-04-18 03:08:54 +00:00
Andrew M. Kuchling 1fcd438956 Update document for the actual 2.1rc1 2001-04-16 02:27:53 +00:00
Fred Drake 3fee30407e Bump version number and set date. 2001-04-14 18:36:03 +00:00
Fred Drake fc4ee0a296 Add convenience targets that build all archive types for single formatting
versions.
2001-04-13 18:00:23 +00:00
Fred Drake 8d00a0ffc3 Michael Hudson:
Update docs for PyDict_Next() based on the most recent changes to the
dictionary code.

This closes SF patch #409864.
2001-04-13 17:55:02 +00:00
Fred Drake 0c4d468e39 Fixup some platform annotations. 2001-04-13 17:37:00 +00:00
Fred Drake 2441366930 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 17:32:49 +00:00
Fred Drake c054c75582 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 17:25:38 +00:00
Fred Drake 62effc1127 Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 15:55:25 +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
Fred Drake d20d8b319c Work around the conversion of ">>" and "<<" to guillemets. Reported by Ping. 2001-04-13 14:52:39 +00:00
Fred Drake a3e56a6ceb Minor markup adjustments.
Turn reference to the cmd module into a hyperlink.
2001-04-13 14:34:58 +00:00
Fred Drake e1f3ed6b58 Update the helper scripts that push development docs to SourceForge;
this version avoids having to build a separate authenticated connection
to push the update-docs.sh script to SF.
2001-04-13 05:13:55 +00:00
Fred Drake 3de33697ef Add entry for ColorPicker documentation as well. 2001-04-13 04:50:01 +00:00
Fred Drake b6bdcb23df Documentation for Just's ColorPicker module, so the Mac OS guys get
something out of this documentation release as well.  ;-)
2001-04-13 04:49:30 +00:00
Eric S. Raymond 4f3980d3cb Added a test main to the pstats library that can help you browse profile dumps. 2001-04-13 00:23:01 +00:00