Commit Graph

309 Commits

Author SHA1 Message Date
Johannes Gijsbers 6ab4b99f95 Patch #1025795: clarify language in Data Structures chapter of tutorial:
- Dictionary keys are in arbitrary order, but not random (which implies, well,
  intentional randomness).
- Move a footnote closer to what it's talking about so that it doesn't look
  like we're saying that "0 == 0.0" can't be relied on.
- Minor language tweaks in the vicinity.

Thanks Dima Dorfman!
2004-09-11 17:48:21 +00:00
Raymond Hettinger d3b0babf66 SF bug #1013760: Error in Chapter 4 of Tutorial
Fit a nit.
2004-08-22 15:24:33 +00:00
Raymond Hettinger d3fe2395b4 Minor improvements to the threading introduction:
* Expand the example to show a join.

* Mention the use case of I/O running concurrent with a computational
  thread.

* Be a tad more forceful about recommending Queue over other approaches
  to synchonization.

* Eliminate discussion around having a single interpreter.  This is a
  more advanced discussion that belongs in the library reference and
  in a section on extending and embedding.
2004-08-16 05:11:04 +00:00
Fred Drake 830d8b8b80 fix markup nit 2004-08-09 14:06:58 +00:00
Michael W. Hudson b6d9fc38e8 Patch:
[ 1003863 ] adds an index entry for __all__ to the tutorial
2004-08-07 17:05:42 +00:00
Fred Drake 4ab0e9e541 revise wording to avoid confusion for non-native English speakers
(second occurance of the same wording)
2004-07-21 17:36:47 +00:00
Fred Drake 20938f57ba revise wording to avoid confusion for non-native English speakers 2004-07-21 17:18:19 +00:00
Raymond Hettinger 44dc13bf3e Fix decimal write-up nits. 2004-07-11 12:49:47 +00:00
Raymond Hettinger 21f9fce968 Fix typo. 2004-07-10 16:11:03 +00:00
Raymond Hettinger 9499658b61 Add a link to the decimal module docs. 2004-07-09 06:00:32 +00:00
Raymond Hettinger 081483cd42 Fix markup and nits. 2004-07-08 09:33:00 +00:00
Tim Peters 74979664d0 Typo repair. 2004-07-07 02:32:36 +00:00
Fred Drake 1b89656d70 add omitted markup 2004-07-01 14:26:31 +00:00
Raymond Hettinger 68a37ac841 * Fix typos.
* Format an example so that the identation is more obvious.
* Add a section on the decimal module to the Brief Tour Part II.
2004-07-01 12:56:54 +00:00
Raymond Hettinger d348193ff2 Add genexps to the glossary. 2004-06-07 21:52:47 +00:00
Fred Drake 22ec5c3639 if we must argue over the/they, we can just remove the unecessary word 2004-06-03 17:19:25 +00:00
Raymond Hettinger 2d1a2aa117 Fix typo: the-->they 2004-06-03 14:13:04 +00:00
Raymond Hettinger e148595504 Fixup spacing in an example. 2004-05-31 22:53:25 +00:00
Raymond Hettinger 4ccf336e56 Fill-in the introductory paragraph for the library tour. 2004-05-26 13:57:54 +00:00
Raymond Hettinger 846865bba6 Add a further tour of the standard library. 2004-05-26 13:52:59 +00:00
Raymond Hettinger a8aebcedf9 Follow official recommendation for domain names in examples. 2004-05-25 16:08:28 +00:00
Raymond Hettinger 170a62221c Add more docs for generator expressions.
* Put in a brief, example driven tutorial entry.
* Use better examples in whatsnew24.tex.
2004-05-19 19:45:19 +00:00
Martin v. Löwis f1f0560832 Patch #940026: Explain "in" when it is first used.
Backported to 2.3.
2004-05-06 01:35:45 +00:00
Andrew M. Kuchling aeaec8d4aa fix typo 2004-03-29 01:19:54 +00:00
Raymond Hettinger f13c024002 Insert missing pronoun 2004-03-28 22:44:09 +00:00
Skip Montanaro dbb407808a - add entry for complex number
- fix a couple typos
- refine definitions for "interpreted" and "coercion" based upon updates on
  the python glossary wiki
2004-03-27 18:23:11 +00:00
Raymond Hettinger 707483fdef Update timeit example to reflect current performance. 2004-03-26 07:56:23 +00:00
Andrew M. Kuchling cbddabfd85 Remove 'now' 2004-03-21 22:12:45 +00:00
Fred Drake f0ae4272b4 fix English usage error reported by Ken Fuchs 2004-02-24 16:13:36 +00:00
Fred Drake e6ed33a6b3 fix minor markup error: \code{for} --> \keyword{for} 2004-02-12 14:35:18 +00:00
Raymond Hettinger b1e5b50531 SF 895560: minor typo 2004-02-12 09:50:42 +00:00
Fred Drake 42713109d9 use consistent email address for Tim 2003-12-30 16:15:35 +00:00
Raymond Hettinger a95e87a488 Guido grants a Christmas wish:
sorted() becomes a regular function instead of a classmethod.
2003-12-17 21:38:26 +00:00
Raymond Hettinger b7a10d1bc5 Incorporate suggestions from Aahz. 2003-12-06 20:12:00 +00:00
Raymond Hettinger f62444ab16 Fix links and typos. 2003-12-05 07:53:50 +00:00
Raymond Hettinger ec3402f287 Fix typo 2003-12-05 06:39:54 +00:00
Raymond Hettinger 8850c8785f Fix link 2003-12-03 22:33:13 +00:00
Raymond Hettinger 8772d4e4c3 Add a standard library tour 2003-12-03 22:23:46 +00:00
Walter Dörwald 7bafa9f340 Fix typo. (From SF bug #853064) 2003-12-03 10:34:57 +00:00
Raymond Hettinger 25695282a5 Convert a 0/1 to False/True. 2003-12-02 07:38:30 +00:00
Raymond Hettinger d4462300db Nits from a review of the documentation update. 2003-11-26 17:52:45 +00:00
Raymond Hettinger 65674b80fc Documentation for set objects. 2003-11-18 17:50:34 +00:00
Raymond Hettinger dc62aeca4c Add a new looping idiom 2003-11-07 01:30:58 +00:00
Neal Norwitz 8ed69e3389 SF #829941, update tutorial, built-in types can be base classes since 2.2 2003-10-25 14:15:54 +00:00
Raymond Hettinger f12f32421f Don't make promises about about the visibility of the induction variable. 2003-10-21 18:42:21 +00:00
Martin v. Löwis 95cf84a4f3 Patch #821093: Fix various typos. 2003-10-19 07:32:24 +00:00
Fred Drake 984920bbad Make the embedded hyperlinks work. 2003-09-28 19:03:36 +00:00
Raymond Hettinger 43b5e40795 * Fix markup.
* Fix entry order:
  -  >>> before ...
  - __slots__ in the S section (like __future__ is in the F section)

Need to test the repaired(?) link to Guido's webpage.

Still needs to have the module reference links made relative to
the module directory instead of the tut directory.  That will
require Fred's magic touch.
2003-09-27 20:19:02 +00:00
Fred Drake d4a1419f53 Lots of markup corrections. Some are minor, but others are not: the
contents of an \item should not be enclosed in a group!
2003-09-27 18:59:43 +00:00
Raymond Hettinger 5a25aa6c4a Fix spelling and add markup. 2003-09-27 05:42:14 +00:00
Skip Montanaro 40d4bc5934 Add a glossary to the tutorial. Also generate an index. At the moment this
mostly only references glossary entries.
2003-09-24 16:53:02 +00:00
Skip Montanaro 757dedc1a3 first cut at a glossary 2003-09-24 16:51:23 +00:00
Raymond Hettinger 16434b5e25 Fix whitespace in example 2003-09-24 03:58:56 +00:00
Fred Drake f5c87c4d99 - added many links into the library reference
- removed use of the string module
- fixed some broken markup
2003-09-11 06:06:26 +00:00
Fred Drake 626d472edd - add several links into the library reference
- update a couple of URLs to point to more recent portions of
  python.org
2003-09-11 04:28:13 +00:00
Raymond Hettinger 57d71289a1 SF patch #797868: Tutorial, sec. 5.1.4 could contain an extra example
(Revised from the original patch contributed by Michal Pasternak.)

Also, make a couple minor fixups elsewhere.
2003-08-30 23:21:32 +00:00
Raymond Hettinger c2a5cb2327 Fix typo.
Thou shalt not count to two unless proceeding to the number three.
2003-08-23 03:49:08 +00:00
Fred Drake 236ffba400 Adjust some horizontal indentation to be consistent with the style used
throughout the documentation.
2003-08-16 06:30:47 +00:00
Neil Schemenauer 90b182c16c Don't introduce map(None, ...) in the tutorial. In practice, zip() is
usually preferred.
2003-08-14 22:57:46 +00:00
Raymond Hettinger c7a26562f9 SF patch#786531 'the the' typo. Contributed by George Yoshida 2003-08-12 00:01:17 +00:00
Raymond Hettinger 0eec08794c Explain argument unpacking 2003-08-08 23:32:46 +00:00
Raymond Hettinger b233e54409 Nits. 2003-07-15 23:16:01 +00:00
Raymond Hettinger 6122d0267f SF patch #726751: Clarify docs for except target assignment
Brett found that the tutorial didn't really explain what was happening
with exception targets.  Hopefully, this sheds some light on the subject.
2003-07-12 01:05:37 +00:00
Raymond Hettinger fa6cce1fdd Minor fixups and added sections for iterators and generators. 2003-07-11 18:58:11 +00:00
Fred Drake dfda8d79ee - explain about making Python scripts executable on Unix in more
detail
- fix minor markup nit
2003-07-07 21:00:29 +00:00
Raymond Hettinger 8ee006097f SF #751062: Tutorial: remove string exceptions, add parnassus, #posts
(Contributed by Gerritt Holl)

* Remove the last mentions of string exceptions
* Reference a third-party repository of programs
* Minor clarification of comp.lang.py posting volumes
2003-07-01 06:19:34 +00:00
Raymond Hettinger ccd615c1a7 SF bug #762990: Awful Grammar in Python Tutorial
Fixed a nit.
2003-06-30 04:27:31 +00:00
Skip Montanaro 32a5e878d7 minor wordsmithing 2003-06-29 16:01:51 +00:00
Fred Drake ded8e740df Correct markup errors that prevented formatting. 2003-06-28 11:50:34 +00:00
Martin v. Löwis 7928f388c4 Explain source encodings. Fixes #683486. 2003-06-28 08:11:55 +00:00
Fred Drake 2664cbbeba Remove heading from orphan section. 2003-06-20 14:27:27 +00:00
Fred Drake 3a8fbe7eec Include "instances of most classes" in a warning about mutable objects
as default values of function/method parameters.
2003-06-18 17:14:29 +00:00
Fred Drake 6bab183d4e Markup nits. 2003-05-20 15:28:58 +00:00
Raymond Hettinger a02469f969 More message updates and minor fixes. 2003-05-07 17:49:36 +00:00
Raymond Hettinger a2f84ceda5 Update traceback message 2003-05-07 17:11:15 +00:00
Skip Montanaro 45a9c93236 add missing parens - verified w/ interpreter - sorry to dismiss your comment
Fred
2003-05-07 16:01:43 +00:00
Skip Montanaro b4f12424a5 replace most uses of `...` by repr(...), noting that `...` is discouraged,
but convenient in interactive sessions.
2003-05-07 15:29:12 +00:00
Fred Drake 03e929e7e0 Fix some markup nits. 2003-04-22 14:30:53 +00:00
Alex Martelli a70b19147f Adding new built-in function sum, with docs and tests. 2003-04-22 08:12:33 +00:00
Raymond Hettinger 60de2e837f SF bug #699237: Tutorial uses omitted slice indices before explaining them
Moved up the explanation of slice default arguments.
2003-03-12 04:46:52 +00:00
Guido van Rossum 46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Fred Drake d0c7137c8b Chapter titles that get split over multiple lines in the typeset
formats can't have whitespace after the last non-blank character (bug
in LaTeX?); fix up a couple of instances of this.

Update an email address.
2002-10-28 19:28:22 +00:00
Raymond Hettinger 7fbd01262c Clarify packages in tutorial. Closes SF bug #616211. 2002-10-26 03:13:57 +00:00
Fred Drake 55803bca98 Describe __path__ along with the rest of the package description.
Closes SF bug #626554.
2002-10-22 21:00:44 +00:00
Martin v. Löwis 36a4d8c20e Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
Raymond Hettinger 44c42b9cf3 Added a tutorial note and example regarding the scope of loop variables
in a list comprehension.  Includes a justification and a comparision
to regular for-loops.

Closes SF bug 605047.
2002-09-06 18:06:04 +00:00
Raymond Hettinger a6e16a86c4 Replace all cases of "while 1" with "while True".
Though slightly slower, has better clarity and teaching value.
2002-08-21 04:54:00 +00:00
Michael W. Hudson dd32a91cc0 This is my patch
[ 587993 ] SET_LINENO killer

Remove SET_LINENO.  Tracing is now supported by inspecting co_lnotab.

Many sundry changes to document and adapt to this change.
2002-08-15 14:59:02 +00:00
Fred Drake 5c08a99b77 Remove a broken example of extreme backward compatibility; it is
simply not relevant any more.
Closes SF bug #595032.
2002-08-14 15:26:18 +00:00
Raymond Hettinger ae7ef57cba GvR pointed out that only enclosing function bodies are part of nested scopes. 2002-08-07 20:20:52 +00:00
Raymond Hettinger 861bb02448 Describe nested scopes in the tutorial. Closes SF bug 500704. 2002-08-07 16:09:48 +00:00
Fred Drake 33fd5f7e02 Fix typo reported to python-docs. 2002-06-26 21:25:15 +00:00
Raymond Hettinger 07dc91800f Close bug 480337: Dict used before dicts explained. Added explanation
and examples of the dict() constructor.
2002-06-25 15:13:18 +00:00
Raymond Hettinger 7951f60f45 Fix spacing in loop example 2002-06-25 03:17:03 +00:00
Fred Drake 55ad7f84a4 Completely revise markup for the list of list methods; the new markup matches
the semantics and presentation used in the library reference.
Added an explanation of the use of [...] to denote optional arguments, since
this is the only use of this in a signature line.
Closes SF bug #567127.
2002-06-11 02:56:17 +00:00
Neal Norwitz d68f5171eb As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
2002-05-29 15:54:55 +00:00
Andrew M. Kuchling e7bd876f9d Message for NameError has changed 2002-05-02 14:31:55 +00:00
Fred Drake 38f71973e5 Documentation for the enumerate() function/type.
This closes SF patch #547162.
2002-04-26 20:29:44 +00:00
Fred Drake 6cb64f9e46 "Shortcut" should be "short-circuit".
This closes SF bug #526277.
2002-03-08 00:54:43 +00:00
Fred Drake c26467d53f Revise cheeseshop example so that the order of the keyword output is
completely determined by the example; dict insertion order and the string
hash algorithm no longer affect the output.
This fixes SF bug #509281.
2002-01-29 14:53:30 +00:00