Commit Graph

9562 Commits

Author SHA1 Message Date
Georg Brandl 1b3e41c67e Banish tab. 2008-02-26 06:40:10 +00:00
Raymond Hettinger 3fa41d5a1c Docs for itertools.combinations(). Implementation in forthcoming checkin. 2008-02-26 02:46:54 +00:00
Georg Brandl fd429063e1 Revert r61029. 2008-02-25 20:20:45 +00:00
Georg Brandl 976a0590bb Rename sphinx.addons to sphinx.ext. 2008-02-25 20:17:56 +00:00
Brett Cannon 499969a08c Add minor markup for a string. 2008-02-25 05:33:07 +00:00
Andrew M. Kuchling e7b53c52bb Remove stray word 2008-02-24 02:39:15 +00:00
Georg Brandl 4425e7cee7 Specify what kind of warning -3 emits. 2008-02-23 23:43:01 +00:00
Georg Brandl f1699cd4c1 Document import ./. threading issues. #1720705. 2008-02-23 23:25:26 +00:00
Georg Brandl ebcfd11c16 #1506171: added operator.methodcaller(). 2008-02-23 23:04:35 +00:00
Georg Brandl e2065c65d3 #1826: allow dotted attribute paths in operator.attrgetter. 2008-02-23 23:02:23 +00:00
Georg Brandl b0b0317ba2 #1825: correctly document msilib.add_data. 2008-02-23 22:55:18 +00:00
Georg Brandl ffada76d04 Add examples to modulefinder docs. Written for GHOP by Josip Dzolonga. 2008-02-23 22:05:38 +00:00
Georg Brandl 7d009926ad #2101: fix removeAttribute docs. 2008-02-23 21:59:11 +00:00
Georg Brandl 1704828098 Documentation coverage builder, part 1. 2008-02-23 18:47:04 +00:00
Andrew M. Kuchling 8887e54867 #835521: Add index entries for various pickle-protocol methods and attributes 2008-02-23 16:39:43 +00:00
Andrew M. Kuchling 085f75a851 #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Remove automatic handling of datetime.date and datetime.time.
This breaks backward compatibility, but python-dev discussion was strongly
against this automatic conversion; see the bug for a link.
2008-02-23 16:23:05 +00:00
Georg Brandl 5972493383 #2161: Fix opcode name. 2008-02-23 15:43:48 +00:00
Andrew M. Kuchling b678f98511 #2072: correct documentation for .rpc_paths 2008-02-23 15:41:51 +00:00
Georg Brandl 080b094d20 More difflib examples. Written for GHOP by Josip Dzolonga. 2008-02-23 15:19:54 +00:00
Facundo Batista 7e251e83d5 Issue 1089358. Adds the siginterrupt() function, that is just a
wrapper around the system call with the same name.  Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.
2008-02-23 15:07:35 +00:00
Georg Brandl 1647923bbf #1492: allow overriding BaseHTTPServer's content type for error messages. 2008-02-23 15:02:28 +00:00
Facundo Batista b12f0b581a Issue 1781. Now ConfigParser.add_section does not let you add a
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.
2008-02-23 12:46:10 +00:00
Raymond Hettinger 7832d4d534 Add recipe using itertools.product(). 2008-02-23 10:04:15 +00:00
Raymond Hettinger c5705a823b Document itertools.product(). 2008-02-22 19:50:06 +00:00
Georg Brandl 1699db145f Another fix. 2008-02-22 12:57:05 +00:00
Georg Brandl 4e37c66262 Don't reference pyshell. 2008-02-22 12:56:34 +00:00
Georg Brandl 907a720f89 A lot more typo fixes by Ori Avtalion. 2008-02-22 12:31:45 +00:00
Georg Brandl 12db865a64 Part of #2154: minimal syntax fixes in doc example snippets. 2008-02-21 20:38:13 +00:00
Georg Brandl 359b9e994b #2079: typo in userdict docs. 2008-02-21 20:33:38 +00:00
Georg Brandl e1b8e9c666 Fixes contributed by Ori Avtalion. 2008-02-20 19:12:36 +00:00
Facundo Batista 759bfc6207 Issue #1916. Added isgenerator() and isgeneratorfunction() to
inspect.py.  Thanks Javi Mansilla for patch review and
corrections.
2008-02-18 03:43:43 +00:00
Georg Brandl 27cca3cca7 Fix function name. 2008-02-17 15:14:10 +00:00
Georg Brandl 5e203f56db #2131: note that codecs.open() always opens files in binary mode. 2008-02-17 11:33:38 +00:00
Georg Brandl 943321d586 #2120: broken links in advocacy document. 2008-02-16 09:37:32 +00:00
Raymond Hettinger e9b9b35931 Update example to match the current syntax. 2008-02-15 21:21:25 +00:00
Thomas Heller e7fb0c5114 Try to correct a markup error that does hide the following paragraph. 2008-02-14 21:00:28 +00:00
Raymond Hettinger 5111c522e7 Fix markup 2008-02-14 19:02:39 +00:00
Raymond Hettinger 0cd717007d Simplify moneyfmt() recipe. 2008-02-14 12:49:37 +00:00
Christian Heimes 3b718a79af Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
Raymond Hettinger 50361d4d9b Fix markup. 2008-02-14 12:05:42 +00:00
Raymond Hettinger d68bf02810 Show how to remove exponents. 2008-02-14 11:57:25 +00:00
Raymond Hettinger 27a90d989d Improve rst markup 2008-02-14 11:01:10 +00:00
Raymond Hettinger 4631481dfd Add fixed-point examples to the decimal FAQ 2008-02-14 10:46:57 +00:00
Raymond Hettinger abe3237187 Fix decimal repr which should have used single quotes like other reprs. 2008-02-14 02:41:22 +00:00
Thomas Heller a06a1a88ee Add pickle support to ctypes types. 2008-02-13 20:21:53 +00:00
Georg Brandl 0a40ffb1b3 #2063: correct order of utime and stime in os.times()
result on Windows.
2008-02-13 07:20:22 +00:00
Mark Dickinson e1b824793a Implementation of Fraction.limit_denominator.
Remove Fraction.to_continued_fraction and
Fraction.from_continued_fraction
2008-02-12 21:31:59 +00:00
Raymond Hettinger 596fdd0fd3 Restore fractions.rst to the document tree. 2008-02-12 00:15:32 +00:00
Raymond Hettinger bc4ffc17df Backport ABC docs 2008-02-11 23:38:00 +00:00
Raymond Hettinger 2ddbd80606 Fix markup 2008-02-11 23:34:56 +00:00
Mark Dickinson cd873fc142 Put an extra space into the repr of a Fraction:
Fraction(1, 2) instead of Fraction(1,2).
2008-02-11 03:11:55 +00:00
Mark Dickinson d058cd2cc8 Rename rational.Rational to fractions.Fraction, to avoid name clash
with numbers.Rational.  See issue #1682 for related discussion.
2008-02-10 21:29:51 +00:00
Raymond Hettinger da614dcc4f Complete an open todo on pickletools -- add a pickle optimizer. 2008-02-10 20:35:16 +00:00
Mark Dickinson 3a94ee05f7 Typos in decimal comment and documentation 2008-02-10 15:19:58 +00:00
Raymond Hettinger 13a707577f Clarify that decimal also supports fixed-point arithmetic. 2008-02-10 07:21:09 +00:00
Georg Brandl 14a1b8cc46 Fix for newest doctools. 2008-02-09 23:09:25 +00:00
Georg Brandl 3abc6d6cb3 Fix link. 2008-02-09 22:00:00 +00:00
Georg Brandl 8e8e56ceec Needs only 2.4 now. 2008-02-09 21:36:15 +00:00
Nick Coghlan 97fac3eb0a Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5) 2008-02-09 15:28:09 +00:00
Raymond Hettinger 7e33663ec4 Add advice on choosing between DictMixin and MutableMapping 2008-02-08 23:57:06 +00:00
Raymond Hettinger 23bdcc9253 Fix typo 2008-02-07 20:10:49 +00:00
Raymond Hettinger ff1f97307d The float conversion recipe is simpler in Py2.6 2008-02-07 20:04:37 +00:00
Walter Dörwald a53800e02c Fix documentation for Calendar.iterweekdays(): firstweekday is a property.
Fixes second part of #2018.
2008-02-07 19:48:34 +00:00
Walter Dörwald 97bf449f75 Clarify that the output of TextCalendar.formatmonth() and
TextCalendar.formatyear() for custom instances won't be influenced by calls
to the module global setfirstweekday() function. Fixes #2018.
2008-02-07 19:30:22 +00:00
Mark Dickinson 00c2e65850 IEEE 754 should be IEEE 854; give precise reference for
comparisons involving NaNs.
2008-02-07 01:42:06 +00:00
Mark Dickinson ff6672fda1 Fix broken link in decimal documentation. 2008-02-07 01:14:23 +00:00
Mark Dickinson bafa9425a6 Remove incorrect usage of :const: in documentation. 2008-02-06 22:25:16 +00:00
Mark Dickinson 2fc9263df5 Issue 1979: Make Decimal comparisons (other than !=, ==) involving NaN
raise InvalidOperation (and return False if InvalidOperation is trapped).
2008-02-06 22:10:50 +00:00
Walter Dörwald c16c57c733 Remove month parameter from Calendar.yeardatescalendar(),
Calendar.yeardays2calendar() and Calendar.yeardayscalendar() as the methods
don't have such a parameter. Fixes issue #2017.

Rewrap content to 80 chars.
2008-02-06 14:31:55 +00:00
Skip Montanaro 3c0f309fd1 correct object name 2008-02-05 19:24:30 +00:00
Georg Brandl 1cf0522f26 Convert external links to internal links. Fixes #2010. 2008-02-05 12:01:24 +00:00
Christian Heimes 422051a367 Patch #1953
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
2008-02-04 18:00:12 +00:00
Amaury Forgeot d'Arc cab3d98ca1 Ensure that PySet_Add() operates on a newly created frozenset, like PyTuple_SetItem does.
Add PyFrozenSet_Check(), which was not needed before; The list of Py*Set_Check* macros seems to be complete now.

Add missing NEWS entries about all this.
2008-02-03 22:51:43 +00:00
Georg Brandl 63cdb867f0 #2003: fix sentence. 2008-02-03 12:29:00 +00:00
Brett Cannon 89dfbe35af Remove extra tick marks and add a missing closing parenthesis. 2008-02-03 02:34:14 +00:00
Georg Brandl bbc4fc2933 Add email example how to send a multipart message.
Written for GHOP by Martin Matejek.
2008-02-02 10:49:58 +00:00
Georg Brandl 586a57a43c Amendments to the urllib2 docs, written for GHOP by Thomas Lamb. 2008-02-02 09:56:20 +00:00
Georg Brandl a51f61b555 Update for latest sphinx latex writer. 2008-02-01 20:45:33 +00:00
Georg Brandl 7be67ff2e0 Wording nit. 2008-02-01 19:24:01 +00:00
Georg Brandl 73aaeb15ca Rename batch file. 2008-02-01 18:08:09 +00:00
Georg Brandl cd235278ba Add link checker builder, written for GHOP by Thomas Lamb. 2008-02-01 15:50:15 +00:00
Georg Brandl 2a5d1c3493 Update IPv6 RFC number. 2008-02-01 11:59:08 +00:00
Jeffrey Yasskin ca2b69f765 Move __builtins__.trunc() to math.trunc() per
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
2008-02-01 06:22:46 +00:00
Jeffrey Yasskin b23dea6adb Added more documentation on how mixed-mode arithmetic should be implemented. I
also noticed and fixed a bug in Rational's forward operators (they were
claiming all instances of numbers.Rational instead of just the concrete types).
2008-01-31 07:44:11 +00:00
Raymond Hettinger a44327a9a2 Update itertool recipes 2008-01-30 22:17:31 +00:00
Raymond Hettinger 7d5fbaee42 Demonstrate new except/as syntax. 2008-01-30 00:51:58 +00:00
Raymond Hettinger e84ada3d95 Factor-out common code with a new macro 2008-01-28 21:48:07 +00:00
Raymond Hettinger ecdcb58950 Make PySet_Add() work with frozensets.
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.
2008-01-28 20:34:33 +00:00
Christian Heimes 908caac52e Added clear cache methods to clear the internal type lookup cache for ref leak test runs. 2008-01-27 23:34:59 +00:00
Georg Brandl 56eadd9d0d Add refcounting extension to build config. 2008-01-27 20:25:12 +00:00
Raymond Hettinger 9bba7b7085 Removed an unnecessary and confusing paragraph from the namedtuple docs. 2008-01-27 10:47:55 +00:00
Gregory P. Smith d006380fe1 Update docs for new callpack params added in r60188 2008-01-26 18:51:05 +00:00
Georg Brandl 2a7d991c6c Clarify "b" mode under Unix. 2008-01-26 14:02:38 +00:00
Andrew M. Kuchling 0c3f1680b3 Add some items 2008-01-26 13:50:51 +00:00
Georg Brandl a7364408cd Fix markup again. 2008-01-26 13:41:21 +00:00
Georg Brandl 0522548d61 Slashes allowed on Windows. 2008-01-26 11:02:22 +00:00
Georg Brandl fe7dd50907 #1934: fix os.path.isabs docs. 2008-01-26 09:43:35 +00:00
Raymond Hettinger dee3f65d98 Revert PySet_Add() changes. 2008-01-26 09:31:11 +00:00
Raymond Hettinger 7c1be2a3b1 Make PySet_Add() work with frozensets. Works like PyTuple_SetItem() to build-up values in a brand new frozenset. 2008-01-26 08:19:06 +00:00
Vinay Sajip f38ba78d7d Added documentation for optional delay argument to FileHandler and subclasses. 2008-01-24 12:38:30 +00:00
Gregory P. Smith 7b7ce7854c Fix issue1789: The tutorial contained a misuse of the struct module.
(also remove an unneeded import struct from test_largefile)
2008-01-24 09:38:26 +00:00
Raymond Hettinger c226c31139 Let pprint() support sets and frozensets (suggested by David Mertz). 2008-01-23 00:04:40 +00:00
Raymond Hettinger 2dec48d1c5 Improve variable name in sample code 2008-01-22 22:09:26 +00:00
Raymond Hettinger 9ed5b57fe2 Give zip() the same guarantee as izip() for left-to-right evaluation. 2008-01-22 20:18:53 +00:00
Raymond Hettinger 48c6293500 Document when to use izip_longest(). 2008-01-22 19:51:41 +00:00
Christian Heimes 74b8e76ec1 Don't repeat yourself
Added the macros PyModule_AddIntMacro and PyModule_AddStringMacro. They shorten PyModule_AddIntConstant(m, "AF_INET", AF_INET) to PyModule_AddIntMacro(m, AF_INET)
2008-01-22 15:25:18 +00:00
Georg Brandl 953e1ee8f4 Fix \xhh specs, #1889. 2008-01-22 07:53:31 +00:00
Georg Brandl dd76e05dd9 Adapt to latest doctools refactoring. 2008-01-21 20:20:53 +00:00
Georg Brandl fa13b5e28b Use original location of document, which has translations. 2008-01-21 18:41:24 +00:00
Vinay Sajip 733024a752 Minor documentation change - hyperlink tidied up. 2008-01-21 17:39:22 +00:00
Georg Brandl af67f303d8 Fix old link. 2008-01-21 17:17:00 +00:00
Georg Brandl 0751d1ad2a Adapt pydoc to new doc URLs. 2008-01-21 17:13:03 +00:00
Georg Brandl aa0de3f130 #997912: acknowledge nested scopes in tutorial. 2008-01-21 16:51:51 +00:00
Georg Brandl f8dd5b393c Removing bundlebuilder docs again -- it's not to be used anymore (see #779825). 2008-01-21 16:46:58 +00:00
Georg Brandl d7e3e60b87 Add a stub for bundlebuilder documentation. 2008-01-21 16:36:00 +00:00
Georg Brandl 864de8274c #1555501: document plistlib and move it to the general library. 2008-01-21 16:34:07 +00:00
Georg Brandl 960b186eaf Fix example. 2008-01-21 16:28:13 +00:00
Georg Brandl 845c403c08 #1087741: make mmap.mmap the type of mmap objects, not a
factory function. Allow it to be subclassed.
2008-01-21 14:16:46 +00:00
Georg Brandl 21297fa621 Fix markup. 2008-01-20 21:10:08 +00:00
Georg Brandl 27f7ab725b #1219903: fix tp_richcompare docs. 2008-01-20 19:48:40 +00:00
Georg Brandl 23bf837a37 Add blurb about executable scripts on Windows. #760657. 2008-01-20 19:40:58 +00:00
Georg Brandl 5235398323 #1669: don't allow shutil.rmtree() to be called on a symlink. 2008-01-20 14:17:42 +00:00
Georg Brandl 56112895d6 #1648: add sys.gettrace() and sys.getprofile(). 2008-01-20 13:59:46 +00:00
Georg Brandl 92058d2933 #652749: document the constants added to the builtins by site.py. 2008-01-20 13:08:37 +00:00
Georg Brandl 440f2fff14 #799369: document possible sys.platform values. 2008-01-20 12:57:47 +00:00
Georg Brandl 2235011d49 #856047: respect the ``no_proxy`` env var when checking for proxies
in urllib and using the other ``_proxy`` env vars.
Original patch by Donovan Baarda.
2008-01-20 12:05:43 +00:00
Georg Brandl 9b0d46db11 #1178141: add addinfourl.code to get http status code from urllib. 2008-01-20 11:43:03 +00:00
Gregory P. Smith da407232e0 Document that zipfile decryption is insanely slow and fix a typo and
blatant lie in a docstring (it is not useful for security regardless of
how you spell it).
2008-01-20 01:32:00 +00:00
Andrew M. Kuchling 4a2762d146 Patch #1048820 from Stefan Wehr: add insert-mode editing to Textbox.
Fix an off-by-one error I noticed.
2008-01-20 00:00:38 +00:00
Georg Brandl 79e3d55be4 Missed one big file to split up. 2008-01-19 22:14:27 +00:00
Georg Brandl f6842722df Split the monstrous C API manual files in smaller parts. 2008-01-19 22:08:21 +00:00
Andrew M. Kuchling 8b506e7a2d Bug 1296: restore text describing OptionGroup 2008-01-19 21:00:38 +00:00
Georg Brandl f558d2e5f5 #1509: fix sqlite3 docstrings and docs w.r.t. cursor.fetchXXX methods. 2008-01-19 20:53:07 +00:00
Georg Brandl e3979f776a #1411695: clarify behavior of xml.sax.utils.[un]escape. 2008-01-19 20:40:24 +00:00
Georg Brandl 309501a617 #1663329: add os.closerange() to close a range of fds,
ignoring errors, and use this in subprocess to speed up
subprocess creation in close_fds mode. Patch by Mike Klaas.
2008-01-19 20:22:13 +00:00
Andrew M. Kuchling 2686f4d9d1 Add item 2008-01-19 19:14:05 +00:00
Facundo Batista 873c9857b7 Fix #1693149. Now you can pass several modules separated by
coma to trace.py in the same --ignore-module option.
Thanks Raghuram Devarakonda.
2008-01-19 18:38:19 +00:00
Andrew M. Kuchling 5c60bfcfbf Patch #976880: add mmap .rfind() method, and 'end' paramter to .find().
Contributed by John Lenton.
2008-01-19 18:18:41 +00:00
Georg Brandl 6ebc52749c Clarify thread.join() docs. #1873. 2008-01-19 17:38:53 +00:00
Andrew M. Kuchling f60b6415e6 Add item 2008-01-19 16:34:09 +00:00
Andrew M. Kuchling e45a77adbe Patch #742598 from Michael Pomraning: add .timeout attribute to SocketServer that will call
.handle_timeout() method when no requests are received within the timeout period.
2008-01-19 16:26:13 +00:00
Georg Brandl 5e3745c886 Fix typos. 2008-01-19 15:22:16 +00:00
Andrew M. Kuchling 4eab1f0e0d Polish sentence 2008-01-19 15:16:37 +00:00
Andrew M. Kuchling f8f4eb69ce Polish sentence 2008-01-19 13:33:20 +00:00
Georg Brandl a7d70fd438 Amend curses docs by info how to write non-ascii characters.
Thanks to Jeroen Ruigrok van der Werven.
2008-01-19 10:16:09 +00:00
Georg Brandl f8e6afbb66 Fix markup. 2008-01-19 10:11:27 +00:00
Jeffrey Yasskin 45169fbc80 Several tweaks: add construction from strings and .from_decimal(), change
__init__ to __new__ to enforce immutability, and remove "rational." from repr
and the parens from str.
2008-01-19 09:56:06 +00:00
Raymond Hettinger 0fe6ca4673 Better variable name in an example. 2008-01-18 21:14:58 +00:00
Georg Brandl a9e073d100 Note that genexps are function scopes too and therefore won't see class attributes. 2008-01-18 16:42:57 +00:00
Vinay Sajip c7403355df Added section on passing contextual information to logging and documentation for the LoggerAdapter class. 2008-01-18 15:54:14 +00:00
Christian Heimes bd865db90c Added win_add2path.py to Tools/scripts/
Added builddoc.bat to Doc/
2008-01-18 11:58:50 +00:00
Andrew M. Kuchling 6d22c3961d Typo fix 2008-01-18 02:42:52 +00:00
Andrew M. Kuchling a13d4fbca4 Bump verson 2008-01-18 02:26:16 +00:00
Raymond Hettinger 64cd1e2d91 Fix markup 2008-01-17 23:56:56 +00:00
Raymond Hettinger 497fdbf767 Fix-up Timer() example. 2008-01-17 23:32:01 +00:00
Christian Heimes ff6cc6b8ef Updated new property syntax. An elaborate example for subclassing and the getter was missing.
Added comment about VS 2008 and PGO builds.
2008-01-17 23:01:44 +00:00
Raymond Hettinger d0ab014b5e Add advice on choosing between scheduler and threading.Timer(). 2008-01-17 22:27:49 +00:00
Andrew M. Kuchling 4e06b8a86f Correction from Jordan Lewis: halfdelay() uses tenths of a second, not milliseconds 2008-01-17 19:49:24 +00:00
Raymond Hettinger 44bd6c0a4f Issue #1861: Add read-only attribute listing upcoming events in the order they will be run. 2008-01-17 19:31:38 +00:00
Andrew M. Kuchling d221956f0e Revise 3141 section a bit; add some Windows items 2008-01-17 12:00:15 +00:00
Gregory P. Smith bde4ae4bde Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339
- Factor out the duplication of EHLO/HELO in login() and sendmail() to
  a new function, ehlo_or_helo_if_needed().
- Use ehlo_or_helo_if_needed() in starttls()
- Check for the starttls exception in starttls() in the same way as
  login() checks for the auth extension.
Contributed by Bill Fenner.
2008-01-17 08:35:49 +00:00
Raymond Hettinger d59f457279 Note versionadded. 2008-01-17 08:07:05 +00:00
Gregory P. Smith 63bfc1d19f Comply with RFC 3207.
Fixes issue 829951 - http://bugs.python.org/issue829951
2008-01-17 07:43:20 +00:00
Raymond Hettinger 473170908e Make starmap() match its pure python definition and accept any itertable input (not just tuples). 2008-01-17 03:02:14 +00:00
Raymond Hettinger 171f3916c5 Minor wordsmithing. 2008-01-16 23:38:16 +00:00
Georg Brandl 2077131097 Doc build should work with 2.4 now. 2008-01-16 20:29:00 +00:00
Georg Brandl 7155a09c44 Add Python-specific content to Doc dir. Update configuration file
to work with the newest Sphinx.
2008-01-16 20:27:56 +00:00
Georg Brandl 5c8b2abf71 Fix MSDN library URL. (#1854) 2008-01-16 16:56:29 +00:00
Andrew M. Kuchling 95f17bbfc0 Markup fix 2008-01-16 13:01:51 +00:00
Andrew M. Kuchling aa355542af Add PEP 3141 section 2008-01-16 03:17:25 +00:00
Raymond Hettinger e805782b53 Fix-up half-written paragraph in the docs 2008-01-15 21:22:47 +00:00
Raymond Hettinger f59e962b49 Refactor if/elif chain for clarity and speed. Remove dependency on subclasses having to implement _empty and _full. 2008-01-15 20:52:42 +00:00
Andrew M. Kuchling 7b1e917e41 Restore description of sys.dont_write_bytecode.
The duplication is intentional -- this paragraph is in a section
describing additions to the sys module, and there's a later section
that mentions the switch.  I think most people scan the what's-new and
don't read it in detail, so a bit of duplication is OK.
2008-01-15 14:38:05 +00:00
Jeffrey Yasskin d7b00334f3 Add rational.Rational as an implementation of numbers.Rational with infinite
precision. This has been discussed at http://bugs.python.org/issue1682. It's
useful primarily for teaching, but it also demonstrates how to implement a
member of the numeric tower, including fallbacks for mixed-mode arithmetic.

I expect to write a couple more patches in this area:
 * Rational.from_decimal()
 * Rational.trim/approximate() (maybe with different names)
 * Maybe remove the parentheses from Rational.__str__()
 * Maybe rename one of the Rational classes
 * Maybe make Rational('3/2') work.
2008-01-15 07:46:24 +00:00
Georg Brandl ca9c6e433c Remove duplicate entry. 2008-01-15 06:58:15 +00:00
Georg Brandl af30b2846e Typo. 2008-01-15 06:55:56 +00:00
Raymond Hettinger 907cda6ebb Small grammar nit 2008-01-15 05:46:43 +00:00
Skip Montanaro f233b0c454 Better (?) text describing the lack of guarantees provided by qsize(),
empty() and full().
2008-01-15 03:40:20 +00:00
Raymond Hettinger d4c2e8659c Tighten the definition of a named tuple. 2008-01-15 03:07:42 +00:00
Andrew M. Kuchling a01ed03058 Repair unfinished sentence 2008-01-15 01:55:32 +00:00
Andrew M. Kuchling 2e46355280 Add many items 2008-01-15 01:47:32 +00:00
Andrew M. Kuchling f15ff46be5 Markup fix 2008-01-15 01:29:44 +00:00
Andrew M. Kuchling 7ce9b18460 Typo fixes 2008-01-15 01:29:16 +00:00
Andrew M. Kuchling 5d8b379abc Update description of float_info 2008-01-14 14:48:43 +00:00
Christian Heimes c94e2b5c12 Now that I've learnt about structseq objects I felt like converting sys.float_info to a structseq. It's
readonly and help(sys.float_info) explains the attributes nicely.
2008-01-14 04:13:37 +00:00
Christian Heimes f31b69f9db Applied patch #1816: sys.flags patch 2008-01-14 03:42:48 +00:00
Georg Brandl 9f1e2ecb48 Clarify the effect of text mode. 2008-01-13 09:36:18 +00:00
Raymond Hettinger 8bdd044dfd Fix spelling. 2008-01-13 06:18:07 +00:00
Raymond Hettinger c20ed51dc3 Named tuple is a concept, not a specific type. 2008-01-13 06:15:15 +00:00
Georg Brandl fca4e1ffa1 Fix editing glitch. 2008-01-12 16:11:09 +00:00
Georg Brandl 57fe0f2902 Move OSError docs to exceptions doc, remove obsolete descriptions
from os docs, rework posix docs.
2008-01-12 10:53:29 +00:00
Mark Dickinson 59bc20bb27 Issue 1780: Allow leading and trailing whitespace in Decimal constructor,
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
2008-01-12 01:56:00 +00:00
Raymond Hettinger bed4dd459d Update the opcode docs for STORE_MAP and BUILD_MAP 2008-01-11 23:25:18 +00:00
Andrew M. Kuchling de68037202 Bug #1790: update link; remove outdated paragraph 2008-01-11 19:33:24 +00:00
Georg Brandl e3c3db59b5 Documentation for r5990[3567]. 2008-01-11 09:55:53 +00:00
Raymond Hettinger d1ef85420f Run doctests on the collections module 2008-01-11 00:23:13 +00:00
Raymond Hettinger 15b5e55b48 Neaten-up the named tuple docs 2008-01-10 23:00:01 +00:00
Amaury Forgeot d'Arc d08a8ebf2a Closing issue1761.
Surprising behaviour of the "$" regexp: it matches the
end of the string, AND just before the newline at the end
of the string::

    re.sub('$', '#', 'foo\n') == 'foo#\n#'

Python is consistent with Perl and the pcre library, so
we just document it.
Guido prefers "\Z" to match only the end of the string.
2008-01-10 21:59:42 +00:00
Raymond Hettinger e850c466c7 Clarify how to add a field to a named tuple. 2008-01-10 20:37:12 +00:00
Raymond Hettinger e1655088ca Examples for named tuple subclassing should include __slots__ 2008-01-10 19:15:10 +00:00
Raymond Hettinger dc1854dec4 Fix typo 2008-01-09 03:13:20 +00:00
Raymond Hettinger e11230e11b Syntax highlighting only works when >>> lines are accompanied by ... lines 2008-01-09 03:02:23 +00:00
Georg Brandl 8d10167236 Better method for associating .py files with the interpreter. 2008-01-08 19:42:30 +00:00
Georg Brandl 502d6312db Fix markup errors from r59857 and clarify key.__enter__/__exit__ docs 2008-01-08 16:18:26 +00:00
Christian Heimes b39a756afd Added __enter__ and __exit__ functions to HKEY object
Added ExpandEnvironmentStrings to the _winreg module.
2008-01-08 15:46:10 +00:00
Andrew M. Kuchling e0a49b6e05 Patch 1137: allow assigning to .buffer_size attribute of PyExpat.parser objects 2008-01-08 14:30:55 +00:00
Raymond Hettinger ac5742e0fe Docs on named tuple's naming conventions and limits of subclassing 2008-01-08 02:24:15 +00:00
Raymond Hettinger f6b769b464 Documentation nits. 2008-01-07 21:33:51 +00:00
Raymond Hettinger f5e8af1bb7 Use get() instead of pop() for the optimized version of _replace(). 2008-01-07 20:56:05 +00:00
Raymond Hettinger fb3ced663d Minor markup fix 2008-01-07 20:17:35 +00:00
Raymond Hettinger 9a359210aa Cleanup named tuple subclassing example. 2008-01-07 20:07:38 +00:00
Vinay Sajip aa0665ba17 Added section about adding contextual information to log output. 2008-01-07 19:40:10 +00:00
Georg Brandl 3ccb49afed Clarify metaclass docs and add example. 2008-01-07 19:17:10 +00:00
Georg Brandl 61d2886491 Fix two further doc build warnings. 2008-01-07 18:57:03 +00:00
Raymond Hettinger 1b0ebb168d Fix inconsistent title levels -- it made the whole doc build crash horribly. 2008-01-07 18:52:19 +00:00
Georg Brandl 62416bcf5a #467924, patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall. 2008-01-07 18:47:44 +00:00
Georg Brandl 62647653eb Restructure urllib doc structure. 2008-01-07 18:23:27 +00:00
Georg Brandl aed6c66aa8 patch #1668: clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG. 2008-01-07 17:25:53 +00:00
Georg Brandl 2da0fceba7 Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode. 2008-01-07 17:09:35 +00:00
Georg Brandl b3255ed8c9 Restore "somenamedtuple" as the "class" for named tuple attrs. 2008-01-07 16:43:47 +00:00
Mark Summerfield 86dfee5c45 Added a hyperlink from sequence types to mutable sequence types. 2008-01-07 16:42:08 +00:00
Christian Heimes fb2d25a154 Issue #1646: Make socket support TIPC. The socket module now has support
for TIPC under Linux, see http://tipc.sf.net/ for more information.
Thanks to Alberto Bertogli for the patch
2008-01-07 16:12:44 +00:00
Vinay Sajip e28fa297e9 Updated docs for basicConfig to indicate it's a no-op if handlers have been defined for the root logger. 2008-01-07 15:30:36 +00:00
Georg Brandl 503f2935c9 Clean up markup. 2008-01-07 09:18:17 +00:00
Georg Brandl 3c403b2370 Consistency nit. 2008-01-07 09:16:08 +00:00
Georg Brandl 66502c11e9 Change virtual class name of __iter__ to "object" in order to make it linkable. 2008-01-07 09:07:38 +00:00
Raymond Hettinger dc55f35f38 Add another named tuple subclassing example. 2008-01-07 09:03:49 +00:00
Raymond Hettinger 1db6f80cd5 Cleanup subclassing example to more clearly show fixed-width print format. 2008-01-07 05:50:35 +00:00
Raymond Hettinger b8e0072fec Add subclassing example to docs for named tuples. 2008-01-07 04:24:49 +00:00
Georg Brandl 4273222a68 Remove latex trace. 2008-01-06 23:22:27 +00:00
Georg Brandl 35f8861386 Add tutorial section about coding style. 2008-01-06 22:05:40 +00:00
Georg Brandl 27a2d1332b Fix introductory sentence. 2008-01-06 17:21:00 +00:00
Georg Brandl e260ba2d33 #1325: Add docs and tests for zipimporter.archive and zipimporter.prefix. 2008-01-06 16:49:50 +00:00
Georg Brandl 516787dd98 #1499: Document compile() exceptions. 2008-01-06 16:22:56 +00:00
Georg Brandl 81de0d24d5 #1582: document __reversed__, patch by Mark Russell. 2008-01-06 16:17:56 +00:00
Georg Brandl ec32b6bce7 #1559684: document that shutil.copy* doesn't copy all metadata on Posix and Windows too. 2008-01-06 16:12:39 +00:00
Georg Brandl 14aaee143d #1686390: add example for csv.Sniffer use. 2008-01-06 16:04:56 +00:00
Georg Brandl 2cb103ffa9 #1727024: document that Popen.returncode is set by Popen.poll/wait. 2008-01-06 16:01:26 +00:00
Georg Brandl c4768a4a98 #1615275: clarify return object types of different tempfile factories. 2008-01-06 15:55:26 +00:00
Georg Brandl 91a4808aa8 #759525: document that dir() doesn't return metaclass attrs when given a class as arg. 2008-01-06 15:48:20 +00:00
Georg Brandl db210dfba2 #1501: document that 0**0 == 1. 2008-01-06 15:41:50 +00:00
Georg Brandl a8cbad3b83 #1755097: document default values for [].sort() and sorted(). 2008-01-06 15:34:57 +00:00
Georg Brandl 437e15d42b #1680: fix context manager example function name. 2008-01-06 15:30:34 +00:00
Raymond Hettinger 1166872006 Small code simplification. Forgot that classmethods can be called from intances. 2008-01-06 09:02:24 +00:00
Georg Brandl 7390f6caa0 Use markup. 2008-01-05 21:10:50 +00:00
Georg Brandl 60c19d2692 Repair markup. 2008-01-05 21:02:25 +00:00
Georg Brandl 165010834a #1719: capitalization error in "UuidCreate". 2008-01-05 20:46:29 +00:00
Georg Brandl 2fa2f5d3e5 Revert socket.rst to unix-eol. 2008-01-05 20:29:13 +00:00
Georg Brandl f725b9587c Doc patch #1730 from Robin Stocker; minor corrections mostly to os.rst. 2008-01-05 19:44:22 +00:00
Georg Brandl 6265833d91 Simplify index entries; fix #1712. 2008-01-05 19:29:45 +00:00
Georg Brandl 9749e15e2f Remove with_statement future imports from 2.6 docs. 2008-01-05 19:28:16 +00:00
Thomas Heller f326898ad4 Add myself. 2008-01-05 17:15:44 +00:00
Jeffrey Yasskin 9871d8fe22 Continue rolling back pep-3141 changes that changed behavior from 2.5. This
round included:
 * Revert round to its 2.6 behavior (half away from 0).
 * Because round, floor, and ceil always return float again, it's no
   longer necessary to have them delegate to __xxx___, so I've ripped
   that out of their implementations and the Real ABC. This also helps
   in implementing types that work in both 2.6 and 3.0: you return int
   from the __xxx__ methods, and let it get enabled by the version
   upgrade.
 * Make pow(-1, .5) raise a ValueError again.
2008-01-05 08:47:13 +00:00
Raymond Hettinger 1b50fd7cb3 Add error-checking to namedtuple's _replace() method. 2008-01-05 02:17:24 +00:00
Raymond Hettinger 02740f73ff Improve namedtuple's _cast() method with a docstring, new name, and error-checking. 2008-01-05 01:35:43 +00:00
Andrew M. Kuchling 54966a5f94 Fix markup 2008-01-04 18:25:05 +00:00
Andrew M. Kuchling 73835bd5e9 Fix markup 2008-01-04 18:24:41 +00:00
Christian Heimes 04ae916fa2 Added interface to Windows' WSAIoctl and a simple example for a network sniffer. 2008-01-04 15:23:30 +00:00
Raymond Hettinger e0734e7dc0 Minor fix-ups to named tuples:
* Make the _replace() method respect subclassing.

* Using property() to make _fields read-only wasn't a good idea.
  It caused len(Point._fields) to fail.

* Add note to _cast() about length checking and alternative with the star-operator.
2008-01-04 03:22:53 +00:00
Andrew M. Kuchling 3b5547021b Add math items; other edits 2008-01-04 02:31:40 +00:00
Christian Heimes d0d7d87869 Filled in some XXX comments 2008-01-04 02:03:25 +00:00
Andrew M. Kuchling 654ede7ef4 Add items 2008-01-04 01:16:12 +00:00
Andrew M. Kuchling 7ef1ce69d0 Markup fixes; grammar tweaks 2008-01-04 01:15:50 +00:00
Christian Heimes eebb79cc69 Added copysign(x, y) function to the math module 2008-01-03 22:32:26 +00:00
Christian Heimes 000a074c95 Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
2008-01-03 22:16:32 +00:00
Christian Heimes e2ca4245c9 Added math.isinf() and math.isnan() 2008-01-03 20:23:15 +00:00
Jeffrey Yasskin 2f3c16be73 Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689.
2008-01-03 02:21:52 +00:00
Raymond Hettinger 81a885af05 Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object(). 2007-12-29 22:16:24 +00:00
Raymond Hettinger 5d332bbdee Simpler documentation for itertools.tee(). Should be backported. 2007-12-29 22:09:34 +00:00
Georg Brandl b19be571e0 Some cleanup in the docs. 2007-12-29 10:57:00 +00:00
Andrew M. Kuchling 2d60cf7135 Add item 2007-12-22 17:27:02 +00:00
Guido van Rossum 02de8979cc Patch #1583 by Adam Olsen.
This adds signal.set_wakeup_fd(fd) which sets a file descriptor to
which a zero byte will be written whenever a C exception handler runs.

I added a simple C API as well, PySignal_SetWakeupFd(fd).
2007-12-19 19:41:06 +00:00
Andrew M. Kuchling d586559c31 Add a bunch of items 2007-12-19 02:02:04 +00:00
Raymond Hettinger 85dfcf3530 Users demand iterable input for named tuples. The author capitulates. 2007-12-18 23:51:15 +00:00
Christian Heimes 0a8143f646 Applied patch #1635: Float patch for inf and nan on Windows (and other platforms).
The patch unifies float("inf") and repr(float("inf")) on all platforms.
2007-12-18 23:22:54 +00:00
Raymond Hettinger 8777bcae27 Simplify and speedup _asdict() for named tuples. 2007-12-18 22:21:27 +00:00
Raymond Hettinger 88880b2dd6 Add more namedtuple() test cases. Neaten the code and comments. 2007-12-18 00:13:45 +00:00
Georg Brandl d41b8dc58c Don't use quotes for non-string code. 2007-12-16 23:15:07 +00:00
Georg Brandl 9f72d237f8 Use PEP 8. 2007-12-16 23:13:29 +00:00
Georg Brandl 001e8388d4 Simplify. 2007-12-16 23:11:16 +00:00
Georg Brandl eee1fc51ba Adapt conf.py to new option names. 2007-12-16 19:36:51 +00:00
Georg Brandl 1bd51e3eec Remove curious space-like characters. 2007-12-16 16:00:36 +00:00
Georg Brandl 6dfe956bfc Remove another unnecessary Unicode character. 2007-12-16 15:59:19 +00:00
Georg Brandl 459744cc71 Remove gratuitous unicode character. 2007-12-16 15:53:49 +00:00
Georg Brandl 05df69b2ea Remove orphaned footnote reference. 2007-12-16 15:47:46 +00:00
Georg Brandl 4257ca7afb Argh, wrong version. 2007-12-15 09:36:37 +00:00
Georg Brandl 07b55eadc2 Add note about future import needed for with statement. 2007-12-15 09:34:59 +00:00
Andrew M. Kuchling 90921cc4b5 Bump the version number, and make a few small edits 2007-12-14 22:52:36 +00:00
Andrew M. Kuchling df2d745f38 Remove warning about URL 2007-12-14 22:41:18 +00:00
Raymond Hettinger e846f38c77 Add usage note 2007-12-14 21:51:50 +00:00
Raymond Hettinger 07ae83f840 Faster and simpler _replace() method 2007-12-14 19:19:59 +00:00
Georg Brandl adbda844d0 Add a section about nested listcomps to the tutorial.
Thanks to Ian Bruntlett and Robert Lehmann.
2007-12-14 19:03:36 +00:00
Raymond Hettinger 366523c667 Update method names for named tuples. 2007-12-14 18:12:21 +00:00
Raymond Hettinger 48eca67ab9 Add line spacing for readability 2007-12-14 18:08:20 +00:00
Raymond Hettinger 42da874cdd Cleaner method naming convention 2007-12-14 02:49:47 +00:00
Raymond Hettinger 04a9a0e904 Simplify implementation of __replace__() 2007-12-13 22:55:52 +00:00
Georg Brandl 2382832bf3 Add another GHOP contributor. 2007-12-11 16:32:49 +00:00
Christian Heimes 7c7f6afa92 Added wide char api variants of getch and putch to msvcrt module. The wide char methods are required to fix #1578 in py3k. I figured out that they might be useful in 2.6, too. 2007-12-10 15:12:41 +00:00
Brett Cannon 338d41850a Use a versionchanged directive. 2007-12-09 05:09:37 +00:00
Georg Brandl e151ab4282 Adapt style. 2007-12-08 17:56:07 +00:00
Skip Montanaro 546624609e correct email address 2007-12-08 15:26:16 +00:00
Skip Montanaro ffe455c3a2 + "context manager" 2007-12-08 15:23:31 +00:00
Georg Brandl e40a6a85ee Add examples to the datetime documentation. Written for GHOP by "h4wk.cz". 2007-12-08 11:23:13 +00:00
Georg Brandl e7d118a5a1 Fix markup in whatsnew, use new directive in ACKS. 2007-12-08 11:05:05 +00:00
Georg Brandl 013d574183 Update to windows doc from Robert. 2007-12-07 15:16:57 +00:00
Raymond Hettinger ba9eea5aaa Don't have the docs berate themselves. Keep a professional tone.
If a todo is needed, put it in the tracker.
2007-12-07 01:53:01 +00:00
Georg Brandl d6b20dc54f Better re.split examples. 2007-12-06 09:45:39 +00:00
Georg Brandl 2b92f6bab3 Diverse markup fixes. 2007-12-06 01:52:24 +00:00
Georg Brandl 923ad7a948 Add another GHOP student to ACKS. 2007-12-06 00:24:23 +00:00
Georg Brandl 749fddc093 Add Ross Light, a GHOP student, to ACKs. 2007-12-05 21:52:40 +00:00
Georg Brandl 0b60a14f13 Another markup fix. 2007-12-05 20:03:57 +00:00
Georg Brandl 45c088c2e7 Fix markup. 2007-12-05 19:49:21 +00:00
Georg Brandl b8df156ab5 Add examples to re docs. Written for GHOP by Dan Finnie. 2007-12-05 18:30:48 +00:00
Georg Brandl 722e1011c9 Add examples to csv, pprint and traceback docs.
Written by Ross for GHOP.
2007-12-05 17:56:50 +00:00
Georg Brandl c37f288ec6 Add tutorial and examples to logging docs, from GHOP student "oscar8thegrouch". 2007-12-04 17:46:27 +00:00
Georg Brandl 21c666501b Fix duplicate label and a typo. 2007-12-04 16:50:28 +00:00
Christian Heimes 1206a227c9 Added warning that make install may overwrite or masquerade the default python binary. Use make altinstall instead.
A native English speaker may want to rephrase the paragraph. ;)
2007-12-04 16:36:20 +00:00
Georg Brandl d95a1ee652 Add "Python on Unix" document, mostly written for GHOP
by Shriphani Palakodety.
2007-12-04 16:10:02 +00:00
Andrew M. Kuchling 6e751f4ffa Grammar fix 2007-12-03 21:28:41 +00:00
Georg Brandl 0a0cf16de9 Add examples to the xmlrpclib docs.
Written for GHOP by Josip Dzolonga.
2007-12-03 20:03:46 +00:00
Christian Heimes 44eeaec173 Patch #1537 from Chad Austin
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
2007-12-03 20:01:02 +00:00
Georg Brandl cbcfe4f3e4 #1548: fix apostroph placement. 2007-12-03 19:57:02 +00:00
Facundo Batista bd5b623257 Two small fixes. Issue 1547. 2007-12-03 19:49:54 +00:00
Martin v. Löwis 6b449f4f2b Issue #1727780: Support loading pickles of random.Random objects created
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.
2007-12-03 19:20:02 +00:00
Georg Brandl f19b951126 Add documentation for PySys_* functions.
Written by Charlie Shepherd for GHOP. Also fixes #1245.
2007-12-02 21:58:54 +00:00
Georg Brandl 968a3e570d Fix a sentence I missed before. Do not merge to 3k. 2007-12-02 18:17:50 +00:00
Georg Brandl 584265b001 Add more entries to the glossary.
Written by Jeff Wheeler for GHOP.
2007-12-02 14:58:50 +00:00
Georg Brandl b15a8df519 Convert bdb.rst line endings to Unix style. 2007-12-02 14:37:29 +00:00
Georg Brandl fefcd4ec40 Add example to mmap docs.
Written for GHOP by Rafal Rawicki.
2007-12-02 14:34:34 +00:00
Georg Brandl 87983f24cf Add "Using Python on Windows" document, by Robert Lehmann.
Written for GHOP.
2007-12-01 23:12:45 +00:00
Georg Brandl 39bd059e42 Add examples to the ElementTree documentation.
Written by h4wk.cz for GHOP.
2007-12-01 22:42:46 +00:00
Georg Brandl ebb035ef29 Add a few refcount data entries. 2007-12-01 22:27:56 +00:00
Georg Brandl 16f1df91ce Document PyEval_* functions from ceval.c.
Credits to Michael Sloan from GHOP.
2007-12-01 22:24:47 +00:00
Christian Heimes 3e76d9346b Added one more missing versionadded tag 2007-12-01 15:40:22 +00:00
Georg Brandl 861320d5a7 Add versionadded tags missing in r59254. Do NOT merge to Py3k. 2007-12-01 13:23:04 +00:00
Christian Heimes dfdfaab1c5 Feature #1534
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
2007-12-01 11:20:10 +00:00
Georg Brandl 81ddc1a69b Move lchmod() docs to correct place, and add versionadded tags. 2007-11-30 22:04:45 +00:00
Christian Heimes 3628187b66 Fix for feature request #1528 Add os.fchmod
Georg Brandl has added fchmod() and fchown(). I've contributed lchown but I'm not able to test it on Linux. However it should be available on Mac and some other flavors of Unix.
I've made a quick test of fchmod() and fchown() on my system. They are working as expected.
2007-11-30 21:11:28 +00:00
Georg Brandl 82225b7737 Add more examples to the wsgiref docs.
From GHOP by Josip Dzolonga.
2007-11-29 23:00:03 +00:00
Georg Brandl 430e3620b6 Add examples to the ConfigParser documentation.
Credits go to Thomas Lamb, who wrote this as a task in the GHOP contest.
2007-11-29 17:02:34 +00:00
Georg Brandl 9d83daa03d Fix reference target. 2007-11-29 17:01:20 +00:00
Christian Heimes d7b333779a Added py3kwarning to the documentation of the sys module. 2007-11-28 08:02:36 +00:00
Christian Heimes 28104c58d2 Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
2007-11-27 23:16:44 +00:00
Martin v. Löwis c8dfd588c2 Bug #1494: Document that appendChild removes first. 2007-11-24 18:33:40 +00:00
Georg Brandl b67da6ed2b #1735632: add O_NOATIME constant to os module.
Also document a few other O_ constants that were missing from documentation.
2007-11-24 13:56:09 +00:00
Georg Brandl f8b6abd972 #1355: remove mention of PyXML from xml.dom docs. 2007-11-24 11:42:14 +00:00
Georg Brandl 586edab279 #1467: fix documentation for TestResult.add{Error,Failure}. 2007-11-24 11:39:13 +00:00
Georg Brandl 439f250c00 #1344: document that you need to open std{in,out,err} with PIPE if you want
communicate() to work as described.
2007-11-24 11:31:46 +00:00
Andrew M. Kuchling f7b462f696 Add item 2007-11-23 13:37:39 +00:00
Facundo Batista c0458830fb Fixed detail in add_type() explanation (issue 1463). 2007-11-19 16:30:24 +00:00
Neal Norwitz 76e4d62822 Use a slightly more recent version than 1.5.2b2. 2007-11-19 01:46:20 +00:00
Brett Cannon 5cf449cfb2 Remove a confusing sentence about pth files and which directories are searched
for them.

Closes issue #1431.  Thanks Giambattista Bloisi for the help.
2007-11-17 07:07:29 +00:00
Raymond Hettinger 8465ae8cea Fix signature in example 2007-11-17 01:51:22 +00:00
Raymond Hettinger bc693491eb Add example for use cases requiring default values. 2007-11-15 22:39:34 +00:00
Raymond Hettinger 7c3738e11c Example of multiple replacements. 2007-11-15 03:16:09 +00:00
Raymond Hettinger 213ae014db Fixup example in docs. 2007-11-15 02:58:20 +00:00
Raymond Hettinger 5681cbce81 Small improvement to the implementation of __replace__(). 2007-11-15 02:55:42 +00:00
Raymond Hettinger eeeb9c4445 Accept Issac Morland's suggestion for __replace__ to allow multiple replacements
(suprisingly, this simplifies the signature, improves clarity, and is comparably fast).
Update the docs to reflect a previous change to the function name.
Add an example to the docs showing how to override the default __repr__ method.
2007-11-15 02:44:53 +00:00
Georg Brandl b5b6f3c46e Remove dead link from random docs. 2007-11-14 13:59:09 +00:00
Georg Brandl 03c1d1e9c4 Remove duplication of "this". 2007-11-11 15:16:16 +00:00
Georg Brandl 87426cb151 Fix misleading example. 2007-11-09 13:08:48 +00:00
Georg Brandl 07c19eaa20 Fix seealso link to sets docs. Do not merge to Py3k. 2007-11-09 12:31:43 +00:00
Raymond Hettinger 1760c8a017 Add set.isdisjoint() 2007-11-08 02:52:43 +00:00
Raymond Hettinger 12e94200c0 Fix marshal's incorrect handling of subclasses of builtin types (backport candidate). 2007-11-07 01:13:09 +00:00
Gregory P. Smith e1ac4f1930 Fixes Issue 1385: The hmac module now computes the correct hmac when using
hashes with a block size other than 64 bytes (such as sha384 and sha512).
2007-11-06 00:19:03 +00:00
Mark Summerfield 91f9429bc3 Clarified the fact that you can have comments for individual archive
members even though comments to the archive itself aren't currently
supported.
2007-11-05 14:38:50 +00:00
Mark Summerfield aea6e5913b Added cross-references between the various archive file formats. 2007-11-05 09:22:48 +00:00
Georg Brandl 9c466baa01 Fix syntax for versionchanged markup. 2007-11-04 17:43:49 +00:00
Skip Montanaro d469ff1e6a Note change to get_dialect semantics in 2.5. Will backport to 2.5. 2007-11-04 15:56:52 +00:00
Georg Brandl 7c3e79f67f Make "hashable" a glossary entry and clarify docs on __cmp__, __eq__ and __hash__.
I hope the concept of hashability is better understandable now.
Thanks to Tim Hatch for pointing out the flaws here.
2007-11-02 20:06:17 +00:00
Mark Summerfield ac3d429edc Added more file-handling related cross-references. 2007-11-02 08:24:59 +00:00
Georg Brandl 744b32a544 Fix markup glitch. 2007-11-01 20:37:02 +00:00
Georg Brandl 03b15c67ff #1364: os.lstat is available on Windows too, as an alias to os.stat. 2007-11-01 17:19:33 +00:00
Raymond Hettinger 405884cd62 Sets are marshalable. 2007-10-31 22:15:49 +00:00
Raymond Hettinger 84e26b6d5d Clarify the reasons why pickle is almost always better than marshal 2007-10-31 21:57:58 +00:00
Georg Brandl 706132bbae Make example about hiding None return values at the prompt clearer. 2007-10-30 17:57:12 +00:00
Georg Brandl f4ef23f8c1 Use correct markup. 2007-10-30 17:51:18 +00:00
Neal Norwitz 98f40b1fcd Update URL for Pygments. 0.8.1 is no longer available 2007-10-27 22:32:21 +00:00
Georg Brandl 1a94ec2664 Bug #1287: make os.environ.pop() work as expected. 2007-10-24 21:40:38 +00:00
Andrew M. Kuchling 6d57c827a7 Update name 2007-10-23 20:55:47 +00:00
Georg Brandl fef8be66e3 Update Pygments version from externals. 2007-10-23 18:21:35 +00:00
Neal Norwitz 530042816c Bug #1313, fix typo (wrong variable name) in example. 2007-10-23 05:44:27 +00:00
Travis E. Oliphant 8feafab346 Add phuang patch from Issue 708374 which adds offset parameter to mmap module. 2007-10-23 02:40:56 +00:00
Georg Brandl a739503881 Add :term:s for "new-style class". 2007-10-21 12:15:05 +00:00
Georg Brandl e7a0990113 Add :term:s for iterator. 2007-10-21 12:10:28 +00:00
Georg Brandl cf3fb25932 Add :term: for generators. 2007-10-21 10:52:38 +00:00
Georg Brandl bb75e4e5d2 Unify "file-descriptor" to "file descriptor". 2007-10-21 10:46:24 +00:00
Georg Brandl 5e52db035d Add :term:s for descriptors. 2007-10-21 10:45:46 +00:00
Georg Brandl 5c174bbd84 Add markup to new function descriptions. 2007-10-21 10:32:54 +00:00
Georg Brandl 63fa168326 Unify "byte code" to "bytecode". Also sprinkle :term: markup for it. 2007-10-21 10:24:20 +00:00
Andrew M. Kuchling 27a4498fca Use correct header line 2007-10-20 19:39:35 +00:00
Andrew M. Kuchling e34d2895f2 Various items 2007-10-20 19:35:18 +00:00
Andrew M. Kuchling 529b1a91ce Fix protocol name 2007-10-20 19:25:37 +00:00
Georg Brandl 3507333909 Even more clarification. 2007-10-20 19:08:36 +00:00
Georg Brandl c5004f39fd Clarify -E docs. 2007-10-20 19:05:45 +00:00
Georg Brandl 45af56d330 Add entry to ACKS. 2007-10-20 18:39:25 +00:00
Georg Brandl 1cddfed08d Change title, for now. 2007-10-20 18:33:20 +00:00
Georg Brandl 59d121af67 * Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
  in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
2007-10-20 18:08:14 +00:00
Georg Brandl a147bf9a08 Document new directive "envvar". 2007-10-20 17:51:39 +00:00
Georg Brandl e36a652d0c Make a path more Unix-standardy. 2007-10-20 15:21:22 +00:00
Georg Brandl dd197e95c7 Document new "cmdoption" directive. 2007-10-20 13:36:24 +00:00
Georg Brandl ff27e0cd10 Fix code being interpreted as a target. 2007-10-20 13:22:53 +00:00
Georg Brandl a2ba6ea9aa #1284: "S" means "seen", not unread. 2007-10-19 17:38:49 +00:00
Mark Summerfield 0752d20a34 Added a cross-ref to each other. 2007-10-19 12:48:17 +00:00
Georg Brandl c4ed9713a7 Clarify wording for apply(). 2007-10-19 12:32:39 +00:00
Raymond Hettinger 11e679e6ff Remove useless warning 2007-10-18 21:13:06 +00:00
Facundo Batista d97110dd1b Issue 1289, just a typo. 2007-10-18 03:44:48 +00:00
Brett Cannon 7b201162cf Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
2007-10-16 23:26:45 +00:00
Brett Cannon 1f67a677d0 Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
2007-10-16 23:24:06 +00:00
Andrew M. Kuchling 6edff59e3b Add items 2007-10-16 22:58:03 +00:00
Raymond Hettinger abfd8dff3b More docs, error messages, and tests 2007-10-16 21:28:32 +00:00
Georg Brandl 5fbf663703 Fix email example. 2007-10-13 13:20:03 +00:00
Raymond Hettinger 68995867d5 Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques. 2007-10-10 00:26:46 +00:00
Andrew M. Kuchling 4b3074c795 Eliminate camelcase function name 2007-10-08 23:23:03 +00:00
Raymond Hettinger a48a29947a Eliminate camelcase function name 2007-10-08 21:26:58 +00:00
Georg Brandl 814b04600c #1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
2007-10-08 14:12:47 +00:00
Raymond Hettinger b6893f2bf8 Missed a line in the docs 2007-10-08 09:56:29 +00:00
Raymond Hettinger 2115bbc4da Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
2007-10-08 09:14:28 +00:00
Georg Brandl 16fd6c4617 #1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
2007-10-08 07:50:24 +00:00
Fred Drake 06f8067acf move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
2007-10-05 02:48:32 +00:00
Raymond Hettinger a7fc4b13e0 Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__().  The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
2007-10-05 02:47:07 +00:00
Fred Drake c9b7163da5 wrap lines to <80 characters before fixing errors 2007-10-05 02:46:12 +00:00
Raymond Hettinger 50e90e265f itertools.count() no longer limited to sys.maxint. 2007-10-04 00:20:27 +00:00
Mark Summerfield d92e871ad8 Added note in footnote about string comparisons about
unicodedata.normalize().
2007-10-03 08:53:21 +00:00
Georg Brandl ba2e519082 #1208: document match object's boolean value. 2007-09-27 06:26:58 +00:00
Andrew M. Kuchling 99479ebf9e Add various items 2007-09-25 00:09:42 +00:00
Andrew M. Kuchling 6d407e4d3d Typo fix 2007-09-24 23:46:28 +00:00
Andrew M. Kuchling 9c90635bcb Remove stray odd character; grammar fix 2007-09-24 23:45:51 +00:00
Georg Brandl e4186252b1 #1196: document default radix for int(). 2007-09-24 17:59:28 +00:00
Georg Brandl 97ca58370a Fix typo and double word. 2007-09-24 17:55:47 +00:00
Georg Brandl 4a21268a74 Patch #1181: add os.environ.clear() method. 2007-09-20 17:57:59 +00:00
Georg Brandl efa7d51ee6 #1176: document that string methods don't take keyword args. 2007-09-20 16:45:27 +00:00
Georg Brandl 5d242eef74 alternate -> alternative. 2007-09-20 08:44:59 +00:00
Raymond Hettinger 7268e9d1ff Fit nits 2007-09-20 03:03:43 +00:00
Sean Reifscheider 111c0ea34a issue1172: Documentation of "done" attribute in cgi module. 2007-09-18 23:34:44 +00:00
Raymond Hettinger cbab5949c9 Cleanup docs for NamedTuple. 2007-09-18 22:18:02 +00:00
Georg Brandl 745e48dffa A bit of reordering, also show more subheadings in the lang ref index. 2007-09-18 07:24:40 +00:00
Raymond Hettinger 2b03d45bb9 Handle corner cased on 0-tuples and 1-tuples. Add verbose option so people can see how it works. 2007-09-18 03:33:19 +00:00
Andrew M. Kuchling de37a8cec7 Add item; sort properly 2007-09-18 01:36:16 +00:00
Raymond Hettinger d36a60e1e3 Sync-up named tuples with the latest version of the ASPN recipe.
Allows optional commas in the field-name spec (help when named tuples are used in conjuction with sql queries).
Adds the __fields__ attribute for introspection and to support conversion to dictionary form.
Adds a  __replace__() method similar to str.replace() but using a named field as a target.
Clean-up spelling and presentation in doc-strings.
2007-09-17 00:55:00 +00:00
Bill Janssen 296a59d3be Add support for asyncore server-side SSL support. This requires
adding the 'makefile' method to ssl.SSLSocket, and importing the
requisite fakefile class from socket.py, and making the appropriate
changes to it to make it use the SSL connection.

Added sample HTTPS server to test_ssl.py, and test that uses it.

Change SSL tests to use https://svn.python.org/, instead of
www.sf.net and pop.gmail.com.

Added utility function to ssl module, get_server_certificate,
to wrap up the several things to be done to pull a certificate
from a remote server.
2007-09-16 22:06:00 +00:00
Georg Brandl 7e84c7f4b5 Remove bdb from the "undocumented modules" list. 2007-09-15 16:53:36 +00:00
Facundo Batista e90bc3c81c Some additions (examples and a bit on the tutorial). 2007-09-14 21:29:52 +00:00
Facundo Batista 7c82a3e9c6 Included the new functions, and new descriptions. 2007-09-14 18:58:34 +00:00
Andrew M. Kuchling 1338fbfe59 Make target unique 2007-09-13 22:50:10 +00:00
Andrew M. Kuchling f10878b74c Add various items 2007-09-13 22:49:34 +00:00
Mark Summerfield ddca9f0823 Replaced variable o with obj in operator.rst because o is easy to
confuse.

Added a note about Python 3's collections.Mapping etc., above section
that describes isMappingType() etc.

Added xrefs between os, os.path, fileinput, and open().
2007-09-13 14:54:30 +00:00
Georg Brandl 5a25fcd585 Fix #1139: PyFile_Encoding really is PyFile_SetEncoding. 2007-09-12 18:10:56 +00:00
Georg Brandl 9c478bd850 Fix #1122: wrong return type documented for various _Size() functions. 2007-09-12 18:08:33 +00:00
Georg Brandl bb07a7df91 Bug #1152: use non-deprecated name in example. 2007-09-12 18:05:57 +00:00
Georg Brandl 0001422a0a New documentation page for the bdb module.
(This doesn't need to be merged to Py3k.)
2007-09-12 18:03:51 +00:00
Bill Janssen 93bf9ce9b7 Fix some documentation bugs. 2007-09-11 02:42:07 +00:00
Bill Janssen 98d19dafd9 More work on SSL support.
* Much expanded test suite:

  All protocols tested against all other protocols.
  All protocols tested with all certificate options.
  Tests for bad key and bad cert.
  Test of STARTTLS functionality.
  Test of RAND_* functions.

* Fixes for threading/malloc bug.

* Issue 1065 fixed:

  sslsocket class renamed to SSLSocket.
  sslerror class renamed to SSLError.
  Function "wrap_socket" now used to wrap an existing socket.

* Issue 1583946 finally fixed:

  Support for subjectAltName added.
  Subject name now returned as proper DN list of RDNs.

* SSLError exported from socket as "sslerror".

* RAND_* functions properly exported from ssl.py.

* Documentation improved:

  Example of how to create a self-signed certificate.
  Better indexing.
2007-09-10 21:51:02 +00:00
Martin v. Löwis 3994240b6c Allow making update with no prior checkout. 2007-09-10 13:19:10 +00:00
Gregory P. Smith e9fef694b4 Change socket.error to inherit from IOError rather than being a stand
alone class.  This addresses the primary concern in

 http://bugs.python.org/issue1706815

python-dev discussion here:

 http://mail.python.org/pipermail/python-dev/2007-July/073749.html

I chose IOError rather than EnvironmentError as the base class since
socket objects are often used as transparent duck typed file objects
in code already prepared to deal with IOError exceptions.

also a minor fix:

 urllib2 - fix a couple places where IOError was raised rather than URLError.
           for better or worse, URLError already inherits from IOError so
           this won't break any existing code.

 test_urllib2net - replace bad ftp urls.
2007-09-09 23:36:46 +00:00
Georg Brandl 8360d5de7e Fix a wrong indentation for sublists. 2007-09-07 14:14:40 +00:00
Thomas Heller 2825b2ea44 Add a 'c_longdouble' type to the ctypes module. 2007-09-07 06:32:17 +00:00
Thomas Heller a3a7ddaae5 Fix typo: c_float represents to C float type. 2007-09-06 20:26:20 +00:00
Georg Brandl ecabc37b08 Backport from 3k: #1116: fix reference to old filename. 2007-09-06 14:49:56 +00:00
Georg Brandl 5768d577d3 Backport from Py3k: Bug #1684991: explain lookup semantics for __special__ methods (new-style classes only). 2007-09-05 13:36:44 +00:00
Bill Janssen ffe576dc78 SSL certificate distinguished names should be represented by tuples 2007-09-05 00:46:27 +00:00
Martin v. Löwis 58bd49f5fe Patch #1388440: Add set_completion_display_matches_hook and
get_completion_type to readline.
2007-09-04 13:13:14 +00:00
Mark Summerfield fcb444a8bf Added cross-references plus a note about dict & list shallow copying. 2007-09-04 08:16:15 +00:00
Andrew M. Kuchling b4c629566c Add more items 2007-09-01 21:18:31 +00:00
Andrew M. Kuchling 364b841683 Wording change 2007-09-01 21:17:58 +00:00
Andrew M. Kuchling 6c066dd3ad Add various items 2007-09-01 20:43:36 +00:00
Andrew M. Kuchling 24e99c43c6 Markup fix 2007-09-01 20:31:59 +00:00
Walter Dörwald 73f83d2bc6 Fix typo. 2007-09-01 18:34:05 +00:00
Walter Dörwald 90014e0a3c Fix wrong function names. 2007-09-01 18:18:09 +00:00
Skip Montanaro 222907da56 Added a note and examples to explain that re.split does not split on an
empty pattern match. (issue 852532).
2007-09-01 17:40:03 +00:00
Georg Brandl 847cae6743 Document sets' ">" and "<" operations (backport from py3k). 2007-09-01 15:49:49 +00:00
Georg Brandl 95b571a084 Fix RST link (backport from Py3k). 2007-09-01 07:51:24 +00:00
Georg Brandl 3acd6d5f58 Fix subitem markup. 2007-08-31 08:47:51 +00:00
Georg Brandl 9856e05d56 Document new shorthand notation for index entries. 2007-08-31 06:59:27 +00:00
Lars Gustäbel 89241a3889 Warn about possible risks when extracting untrusted archives. 2007-08-30 20:24:31 +00:00
Mark Summerfield 7f626f4c34 Added more cross-references. 2007-08-30 15:03:03 +00:00
Georg Brandl f11ed159f3 Stronger urge to convert filenames to str before using them as argument to ZipFile.write(). 2007-08-30 10:09:42 +00:00
Bill Janssen 426ea0a864 This contains a number of things:
1) Improve the documentation of the SSL module, with a fuller
   explanation of certificate usage, another reference, proper
   formatting of this and that.

2) Fix Windows bug in ssl.py, and general bug in sslsocket.close().
   Remove some unused code from ssl.py.  Allow accept() to be called on
   sslsocket sockets.

3) Use try-except-else in import of ssl in socket.py.  Deprecate use of
   socket.ssl().

4) Remove use of socket.ssl() in every library module, except for
   test_socket_ssl.py and test_ssl.py.
2007-08-29 22:35:05 +00:00
Walter Dörwald f0d1c1f3ec Fix title endtag in HTMLCalender.formatyearpage(). Fix documentation for
HTMLCalender.formatyearpage() (there's no themonth parameter).

This fixes issue1046.
2007-08-28 16:38:26 +00:00
Georg Brandl 23b8ddc110 Fix some glitches. 2007-08-28 10:48:18 +00:00
Sean Reifscheider 99cafb99ed Adding basic imputil documentation. 2007-08-28 09:07:54 +00:00
Georg Brandl ae0ee8a473 Document rev. 57574. 2007-08-28 08:29:08 +00:00
Guido van Rossum 8ee23bbe7c Patch 10124 by Bill Janssen, docs for the new ssl code. 2007-08-27 19:11:11 +00:00
Neal Norwitz 9a65c89ec0 Spell check (also americanify behaviour, it's almost 3 times as common) 2007-08-26 01:42:03 +00:00
Guido van Rossum 4f2c3ddca4 Server-side SSL and certificate validation, by Bill Janssen.
While cleaning up Bill's C style, I may have cleaned up some code
he didn't touch as well (in _ssl.c).
2007-08-25 15:08:43 +00:00
Nick Coghlan 3af0e785e7 Revert misguided attempt at fixing incompatibility between -m and -i switches (better fix coming soon) 2007-08-25 04:32:07 +00:00
Georg Brandl d558f67d5d Document new utility functions in test_support. 2007-08-24 18:27:43 +00:00
Georg Brandl b3c572ba51 Fix #1012: wrong URL to :mod:`site` in install/index.rst. 2007-08-24 17:46:54 +00:00
Georg Brandl 94bda3a586 Bug #1011: fix rfc822.Message.getheader docs. 2007-08-24 17:23:23 +00:00
Georg Brandl 3761422749 Bug #1758696: more info about descriptors. 2007-08-23 21:42:54 +00:00
Georg Brandl 604c121eee Bug #1625381: clarify match vs search introduction. 2007-08-23 21:36:05 +00:00
Georg Brandl b7a837d81b Bug #1734111: document struct.Struct.size. 2007-08-23 21:21:36 +00:00
Georg Brandl 4ad9b8206c Bug #1752332: httplib no longer uses socket.getaddrinfo(). 2007-08-23 21:18:44 +00:00
Georg Brandl a3a68a0db4 Clarify wording a bit. 2007-08-23 20:55:44 +00:00
Georg Brandl 154cc588d3 Bug #1594966: fix misleading usage example 2007-08-23 20:53:28 +00:00
Georg Brandl 3e0f735ce1 Bug #1694833: fix imp.find_module() docs wrt. packages. 2007-08-23 20:50:23 +00:00
Georg Brandl 891f1d339b Bug #1573854: fix docs for sqlite3 cursor rowcount attr. 2007-08-23 20:40:01 +00:00
Georg Brandl 8d9e84554e Bug #1697820: document that the old slice protocol is still used by builtin types. 2007-08-23 20:35:00 +00:00
Georg Brandl 7cf40799ef Bug #1766421: "return code" vs. "status code". 2007-08-23 17:57:05 +00:00
Georg Brandl 4debd55874 Bug #1768121: fix wrong/missing opcode docs. 2007-08-23 17:54:11 +00:00
Georg Brandl 32008321f5 Bug #1777168: replace operator names "opa"... with "op1"... and mark everything up as literal,
to enhance readability.
2007-08-21 06:12:19 +00:00
Georg Brandl ff457b1d05 Bug #1777160: mention explicitly that e.g. -1**2 is -1. 2007-08-21 06:07:08 +00:00
Georg Brandl fdca6d8599 Demand version 2.5.1 since 2.5 has a bug with codecs.open context managers. 2007-08-21 06:01:18 +00:00
Georg Brandl c553f42907 Fix stray backticks. 2007-08-19 18:43:50 +00:00
Georg Brandl 3f8fbf0589 Fix PDB command descriptions. 2007-08-18 06:05:56 +00:00
Brett Cannon ea424b5a28 Clarify the comment about setting the PYTHON variable for the Doc Makefile. 2007-08-17 18:51:57 +00:00
Georg Brandl 6c82b6c5ca Use glossary x-refs, document new ``!`` feature. 2007-08-17 16:54:59 +00:00
Walter Dörwald 6e39080649 Backport r57105 and r57145 from the py3k branch: UTF-32 codecs. 2007-08-17 16:41:28 +00:00
Georg Brandl 437e6a3b15 Move the glossary from the tutorial to toplevel.
Prepare for cross-linking with the new .. glossary:: directive.
2007-08-17 06:27:11 +00:00
Georg Brandl 690b97c005 Note that smtplib example needs a mailserver. 2007-08-17 05:58:36 +00:00
Georg Brandl ee354b1e96 Fix problem reported by Andre Roberge. 2007-08-17 05:52:24 +00:00
Matthias Klose f0e291870b - mark the findCaller 2-element tuple/3-element tuple change as new in 2.4 2007-08-16 12:03:44 +00:00
Mark Summerfield 216ad337bd Added a note in each regarding the fact that unicode strings that look the same
may not compare equal (due to the possibility of multiple representations).
2007-08-16 10:09:22 +00:00
Georg Brandl bf863b17f0 Replace "Caveat" paragraphs by .. warning::s. 2007-08-15 19:06:04 +00:00
Georg Brandl 7f758c49fa Mark deprecated modules as such. 2007-08-15 18:41:25 +00:00
Georg Brandl 09a5c3e6bb Fix a wrong path in the Makefile. 2007-08-15 18:30:42 +00:00
Georg Brandl 7094a0c9a8 Don't use "?=" which seems to be a GNUism. 2007-08-15 18:02:37 +00:00
Georg Brandl 64dec73154 Add the roman.py module which docutils require. 2007-08-15 17:27:29 +00:00
Georg Brandl 87d2ccf768 Fail somewhat more gracefully when using Python < 2.5. 2007-08-15 17:25:27 +00:00
Georg Brandl 8ec7f65613 Move the 2.6 reST doc tree in place. 2007-08-15 14:28:01 +00:00
Georg Brandl f56181ff53 Delete the LaTeX doc tree. 2007-08-15 14:26:55 +00:00
Brett Cannon 2ee4128e9b Remove test.test_support.guard_warnings_filter.
test.test_support.catch_warning is more full-featured and provides the same
functionality.

Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
2007-08-14 05:51:06 +00:00
Brett Cannon 5153266d13 Clarify the docs for TransientResource. 2007-08-14 03:42:13 +00:00
Georg Brandl 9616444427 Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
2007-08-08 13:03:41 +00:00
Georg Brandl 52c0c368b9 Bug #1769002: fix a now-wrong sentence in the tutorial. 2007-08-07 07:13:24 +00:00
Georg Brandl e7fe6c3db2 Patch #1765839: add link to https+proxy urllib2 opener. 2007-08-06 07:52:20 +00:00
Matthias Klose eb8ff67fd7 - Allow Emacs 22 for building the documentation in info format. 2007-08-02 21:33:13 +00:00
Georg Brandl 1ae6856522 try-except-finally is new in 2.5. 2007-07-29 09:11:15 +00:00
Georg Brandl 304f9ff770 Clarify PEP 343 description. 2007-07-29 08:26:10 +00:00
Georg Brandl c473149a5a tabs, newlines and crs are valid XML characters. 2007-07-26 09:36:25 +00:00
Nick Coghlan 13c25c08ca Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates 2007-07-24 13:58:28 +00:00
Georg Brandl b68c944c3c Add description for wave.setcomptype() values 2007-07-18 22:36:53 +00:00
Georg Brandl a3a4c2f411 Use "Unix" as platform name, not "UNIX". 2007-07-18 06:37:55 +00:00
Andrew M. Kuchling 6111ce3667 Typo fix 2007-07-14 20:58:21 +00:00
Georg Brandl b89c9eeb35 Clarify webbrowser.open description. 2007-07-14 17:32:41 +00:00
Georg Brandl cf3a70441d Bug #1753406: missing \versionadded for subprocess.check_call. 2007-07-14 17:12:23 +00:00
Raymond Hettinger 928713c740 Correct the docs for takewhile(). Improve the recipe for nth(). Should be backported 2007-07-13 12:09:41 +00:00
Georg Brandl 4b3ab6fcc0 Patch #1675424: Added tests for uncovered code in the zipfile module.
The KeyError raised by Zipfile.getinfo for nonexistent names now has
  a descriptive message.
2007-07-12 09:59:22 +00:00
Georg Brandl 9467bc5ad1 Bug #1637365: add subsection about "__name__ == __main__" to the
Python tutorial.
2007-07-12 09:37:49 +00:00
Georg Brandl c8011d649e Patch #1731659: improve time.strptime docs. 2007-07-12 09:06:41 +00:00
Georg Brandl 152ff5f592 Remove duplicate sentence from alarm() doc. 2007-07-02 11:54:28 +00:00
Georg Brandl 6eed49f919 Document smtp.SMTPAuthenticationError. 2007-06-30 11:01:01 +00:00
Georg Brandl a37bd0f4a9 Fix a variable name in winreg docs. 2007-06-27 14:09:56 +00:00
Georg Brandl 00a15bbe2e Bug #1742901: document None behavior of shlex.split. 2007-06-25 15:21:23 +00:00
Georg Brandl 9731eefcfc Bug #1739115: make shutil.rmtree docs clear wrt. file deletion. 2007-06-19 12:38:20 +00:00
Lars Gustäbel 072aaf7150 Added missing \versionchanged tag for the new exclude
parameter.
2007-06-18 20:05:55 +00:00
Lars Gustäbel 104490e615 Added exclude keyword argument to the TarFile.add() method. 2007-06-18 11:42:11 +00:00
Neal Norwitz 9d0476f7da Revert last change for SF #1738754, there's no print in there. 2007-06-18 02:50:15 +00:00
Neal Norwitz cc1934a297 SF #1738754, remove extra backslash in string 2007-06-18 02:46:36 +00:00
Neal Norwitz f2eb4cba1a SF #1738670, make example in doc work 2007-06-17 18:48:32 +00:00
Georg Brandl d8f77debd1 Add missing \versionadded. 2007-06-16 17:10:12 +00:00
Andrew M. Kuchling 0b4589f60d Add a word 2007-06-15 22:43:03 +00:00
Facundo Batista 3ed365be0e Added versionchanged flag to all the methods which received
a new optional timeout parameter, and a versionadded flag to
the socket.create_connection function.
2007-06-11 16:27:08 +00:00
Neal Norwitz 68a57ac411 SF #1734732, lower case the module names per PEP 8.
Will backport.
2007-06-11 05:35:10 +00:00
Thomas Heller 1605ba3a0d Fix wrong documentation, and correct the punktuation.
Closes [1700455].
2007-06-08 19:08:31 +00:00
Facundo Batista 10951d51e2 Added an optional timeout parameter to function urllib2.urlopen,
with tests in test_urllib2net.py (must have network resource
enabled to execute them). Also modified test_urllib2.py because
testing mock classes must take it into acount. Docs are also
updated.
2007-06-06 17:15:23 +00:00
Collin Winter 50b79ce8e6 Patch #1731049: make threading.py use a proper "raise" when checking internal state, rather than assert statements (which get stripped out by -O). 2007-06-06 00:17:35 +00:00
Neal Norwitz a38c7c282e Update expected birthday of 2.6 2007-06-02 18:33:53 +00:00
Neal Norwitz 03b75fa4e1 Add some spaces in the example code. 2007-05-31 04:14:22 +00:00
Georg Brandl d4e42dccf0 Fix rst markup. 2007-05-29 07:16:47 +00:00
Raymond Hettinger 1749a13532 Explain when groupby() issues a new group. 2007-05-28 05:23:22 +00:00
Lars Gustäbel a0fcb9384e Added errors argument to TarFile class that allows the user to
specify an error handling scheme for character conversion. Additional
scheme "utf-8" in read mode. Unicode input filenames are now
supported by design. The values of the pax_headers dictionary are now
limited to unicode objects.

Fixed: The prefix field is no longer used in PAX_FORMAT (in
conformance with POSIX).
Fixed: In read mode use a possible pax header size field.
Fixed: Strip trailing slashes from pax header name values.
Fixed: Give values in user-specified pax_headers precedence when
writing.

Added unicode tests. Added pax/regtype4 member to testtar.tar all
possible number fields in a pax header.

Added two chapters to the documentation about the different formats
tarfile.py supports and how unicode issues are handled.
2007-05-27 19:49:30 +00:00
Peter Astrand 81a191b351 Applied patch 1669481, slightly modified: Support close_fds on Win32 2007-05-26 22:18:20 +00:00
Walter Dörwald 5f9b6c9a1b Fix typo. 2007-05-26 21:04:13 +00:00
Vinay Sajip cf99b65932 Updated documentation for SysLogHandler (#1720726). 2007-05-25 07:06:55 +00:00
Georg Brandl c90bc75994 shlex.split() now has an optional "posix" parameter. 2007-05-24 16:49:29 +00:00
Georg Brandl a69c02ecd1 Remove the "panel" module doc file which has been ignored since 1994. 2007-05-22 14:28:17 +00:00
Neal Norwitz 6f145fce06 Document new params to HTTPSConnection 2007-05-22 06:03:36 +00:00
Georg Brandl 2134e754f2 Patch #1686487: you can now pass any mapping after '**' in function calls. 2007-05-21 20:34:16 +00:00
George Yoshida 5faa75f3c1 fix against r55474 [Remove the macfs module]
Remove "libmacfs.tex" from Makefile.deps and mac/mac.tex.
2007-05-21 04:41:21 +00:00
Andrew M. Kuchling 0f852e2740 Note removed modules 2007-05-21 00:03:15 +00:00
Brett Cannon 5e2635103c Remove the macfs module. This led to the deprecation of macostools.touched();
it completely relied on macfs and is a no-op on OS X according to code
comments.
2007-05-20 23:17:38 +00:00
Nick Coghlan c568cc162a Fix typo in example (should be backported, but my maintenance branch is woefully out of date) 2007-05-20 11:12:49 +00:00
Brett Cannon dc48b74497 Remove the rgbimg module. It has been deprecated since Python 2.5. 2007-05-20 07:09:50 +00:00
Raymond Hettinger 5a41daf096 Improvements to NamedTuple's implementation, tests, and documentation 2007-05-19 01:11:16 +00:00
Fred Drake 88d96ade59 fix argument name in documentation; match the implementation 2007-05-17 19:29:58 +00:00
Brett Cannon d75f043c33 Remove the gopherlib module. It has been raising a DeprecationWarning since
Python 2.5.

Also remove gopher support from urllib/urllib2.  As both imported gopherlib the
usage of the support would have raised a DeprecationWarning.
2007-05-16 22:42:29 +00:00
Georg Brandl f1135f30f8 Bug #1719995: don't use deprecated method in sets example. 2007-05-16 13:44:18 +00:00
Neal Norwitz 25e4461666 Remove references to stdwin which was removed long ago. 2007-05-13 20:54:19 +00:00
Neal Norwitz 7072559db9 Remove Amoeba doc which was removed in version 1.0! according to Misc/HISTORY.
Hopefully Guido won't shed a tear. :-)
2007-05-13 20:45:05 +00:00
Georg Brandl 2dd7d179de Bug #1046945: document SWIG options of distutils. 2007-05-12 21:06:41 +00:00
Georg Brandl e3e62b3783 Update DDJ link. 2007-05-11 11:43:56 +00:00
Georg Brandl c5207c8425 Patch #1714700: clarify os.linesep vs. tfiles opened in text mode.
(backport)
2007-05-11 11:04:26 +00:00
Neal Norwitz 6bf8fa66ff Deprecate os.popen* and popen2 module in favor of the subprocess module. (forgot the doc) 2007-05-11 07:13:30 +00:00
Neal Norwitz 0999a1150a Add markup for True/False. Will backport 2007-05-09 06:43:15 +00:00
Georg Brandl cc40ff831c Bug #1713535: typo in logging example. 2007-05-05 18:55:37 +00:00
Brett Cannon 229cee2d3d Deprecate BaseException.message as per PEP 352. 2007-05-05 01:34:02 +00:00
Walter Dörwald 27f4abf3b1 Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped
in native order mode, and only if it's the first two bytes.
2007-05-03 15:13:55 +00:00
Vinay Sajip c0a293c692 Added documentation for new optional credentials argument to SMTPHandler.__init__(). 2007-05-01 10:21:45 +00:00
Georg Brandl 5a006b3978 Bug #1710295: exceptions are now new-style classes. 2007-05-01 06:04:11 +00:00
Georg Brandl 58ef8cd29c Version fix (bug #1708710) 2007-04-27 19:20:00 +00:00
Steve Holden 6e6eaa7a67 Minor wording change on slicing aide-memoire. 2007-04-26 14:23:12 +00:00
Fred Drake 452f5df64a fix some markup errors 2007-04-26 04:42:19 +00:00
Collin Winter c2898c5a67 Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule(). 2007-04-25 17:29:52 +00:00
Georg Brandl e47c508850 Markup fix. 2007-04-25 06:25:55 +00:00
Georg Brandl 3dc6e90a2e Patch #1698768: updated the "using Python on the Mac" intro. 2007-04-25 06:24:59 +00:00
Raymond Hettinger e133a95d1c Fix markup 2007-04-24 22:13:43 +00:00
Georg Brandl 18afb37845 Bug #1705717: error in sys.argv docs. 2007-04-24 15:10:09 +00:00
Georg Brandl 556697e412 Some new year updates. 2007-04-24 10:36:42 +00:00
Neal Norwitz 8eea9ac889 Fix SF #1703110, Incorrect example for add_password() (use uri, not host) 2007-04-24 04:53:12 +00:00
Raymond Hettinger 4db5fe970c SF 1193128: Let str.translate(None) be an identity transformation 2007-04-12 04:10:00 +00:00
Georg Brandl 5176180610 Repair missing spaces after \UNIX. 2007-04-11 23:28:44 +00:00
Andrew M. Kuchling 5bf02cd17f Describe undocumented third argument to touchline() 2007-04-11 13:47:13 +00:00
Andrew M. Kuchling 400a49ba79 Add window.chgat() method, submitted via e-mail by Fabian Kreutz 2007-04-11 13:39:00 +00:00
Georg Brandl 781aef2d6b Repair a duplicate label and some obsolete uses of \setindexsubitem. 2007-04-10 21:39:38 +00:00
Brett Cannon 55a1864832 Doc that file.next() has undefined behaviour when called on a file opened with
'w'.  Closes bug #1569057.

To be backported once 2.5 branch is unfrozen.
2007-04-08 04:29:32 +00:00
Andrew M. Kuchling 615b49b097 Some grammar fixes 2007-04-06 01:11:58 +00:00
Facundo Batista c3a35e19cc Now using unittest for the tests infraestructure. Also split the
tests in those who need the network, and that who doesn't.
2007-04-03 14:05:08 +00:00
Georg Brandl b28ef9b429 Fix the strange case of
\begin{methoddesc}[NNTP]{...}

where

\ifx#1\@undefined ended up comparing N and N, therefore executing
the true part of the conditional, blowing up at \@undefined.
2007-04-03 07:04:27 +00:00
Raymond Hettinger 9e56d5beeb SF #1382213: Tutorial section 9.5.1 ignores MRO for new-style classes 2007-04-03 01:39:43 +00:00
Georg Brandl 5447850f6f Fix the class name of strings. 2007-04-01 23:31:30 +00:00
Georg Brandl 5f4c580776 Remove bogus entry. 2007-04-01 23:29:10 +00:00
Georg Brandl 30d6c04696 Some semantic fixes. 2007-04-01 22:47:31 +00:00
Georg Brandl 6ec04ffc5d Explicit class names. 2007-04-01 22:40:12 +00:00
Georg Brandl ae91afdcfb Lots of explicit class names for method and member descs. 2007-04-01 22:39:10 +00:00
Georg Brandl b8e8df2e63 Another fix. 2007-04-01 21:39:52 +00:00
Georg Brandl 4e9165d2dd Fix a lot of markup and meta-information glitches. 2007-04-01 21:29:15 +00:00
Georg Brandl 43445315ae Typo fix. 2007-03-31 11:59:54 +00:00
Georg Brandl dc580bd821 Duplicate label fix. 2007-03-31 11:58:36 +00:00
Georg Brandl 5201364de5 Markup fix. 2007-03-31 11:54:58 +00:00
Georg Brandl b8b88743a8 repair string literal. 2007-03-31 10:17:31 +00:00
Georg Brandl 8c09b14978 Markup fix. 2007-03-30 19:14:02 +00:00
Georg Brandl 92a9fc0a2f Duplicate label fix. 2007-03-30 19:01:38 +00:00
Andrew M. Kuchling 588a95d594 Add item. (Oops, accidentally checked this in on my branch) 2007-03-30 18:00:15 +00:00
Georg Brandl f3c123d82d Markup fix. 2007-03-30 17:48:39 +00:00
Georg Brandl bc7d71a8fd Duplicate label fix. 2007-03-30 17:47:21 +00:00
Georg Brandl 749757329a Label name fix. 2007-03-30 17:39:39 +00:00
Georg Brandl 459ef66f6e Markup fix. 2007-03-30 15:49:05 +00:00
Collin Winter d4a0118029 Bug #1688274: add documentation for C-level class objects. 2007-03-30 14:01:25 +00:00
Facundo Batista 93c33680a0 Added the posibility to pass the timeout to FTP.connect, not only when
instantiating the class. Docs and tests are updated.
2007-03-30 13:00:35 +00:00
Facundo Batista b6a5c9d605 Added timout parameter to telnetlib.Telnet. Also created
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.
2007-03-29 18:22:35 +00:00
Georg Brandl 9499b7117a These are actually methods. 2007-03-29 07:41:32 +00:00
Facundo Batista 366d6262f8 Added timeout to smtplib (to SMTP and SMTP_SSL). Also created
the test_smtplib.py file, with a basic test and the timeout
ones. Docs are updated too.
2007-03-28 18:25:54 +00:00
Facundo Batista 1b1c347311 Added an optional timeout to poplib.POP3. Also created a
test_poplib.py file with a basic test and the timeout
ones. Docs are also updated.
2007-03-27 18:23:21 +00:00
Georg Brandl f03facfe90 Some nits. 2007-03-26 20:28:28 +00:00
Facundo Batista 51b7abc519 Added an optional timeout to FTP class. Also I started a test_ftplib.py
file to test the ftp lib (right now I included a basic test, the timeout
one, and nothing else).
2007-03-26 20:18:31 +00:00
Georg Brandl 85fd7ac93d Markup fix. 2007-03-25 19:04:55 +00:00
Georg Brandl 6b5e1aa167 Markup fix. 2007-03-25 18:44:35 +00:00
Brett Cannon 27ef61ca18 Change the docs to no longer claim that unittest is preferred over doctest for
regression tests.
2007-03-25 01:32:36 +00:00
Georg Brandl 3d52e5f07d Revert accidental change. 2007-03-24 22:27:56 +00:00
Georg Brandl b881b9aacf Remove typo accent. 2007-03-24 22:20:34 +00:00
Žiga Seilnacht c64ad484a9 Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output.  Will backport.
2007-03-24 14:24:26 +00:00
Facundo Batista 07c78be0b4 Added a 'create_connect()' function to socket.py, which creates a
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
2007-03-23 18:54:07 +00:00
Martin v. Löwis 2f401d7186 Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Will backport.
2007-03-23 10:35:49 +00:00
Georg Brandl bfcc975527 Bug #1685704: use -m switch in timeit docs. 2007-03-22 08:05:45 +00:00
Facundo Batista 3ff9e55890 Minor clarification, saying that blocking means no timeout (from bug #882297) 2007-03-21 19:41:24 +00:00
Andrew M. Kuchling 4732c6e164 Put code examples at left margin instead of indenting them 2007-03-21 16:59:20 +00:00
Andrew M. Kuchling 7af1bdf619 Fix sentence, and fix typo in example 2007-03-21 16:57:32 +00:00
Andrew M. Kuchling 8aa30927ab Add comments on maintenance of this file 2007-03-21 14:32:43 +00:00
Georg Brandl 5e0b865b0f Patch #1684834: document some utility C API functions. 2007-03-21 09:16:53 +00:00