Commit Graph

574 Commits

Author SHA1 Message Date
Jeroen Ruigrok van der Werven aa3cadb01e Windows x64 also falls under VER_PLATFORM_WIN32_NT. 2008-04-21 20:15:39 +00:00
Benjamin Peterson ad9f62953f Moved Mark SummerField's io doc changes back to the trunk. (He will edit here in the future.) 2008-04-21 11:57:40 +00:00
Andrew M. Kuchling 89830c3ab1 Wording changes 2008-04-21 02:08:13 +00:00
Andrew M. Kuchling 64c6a0ef6e Markup fix 2008-04-21 02:08:00 +00:00
Mark Dickinson 47a84aa978 Move asinh documentation to the proper place.
Remove meaningless 'in radians' from inverse
hyperbolic functions.
2008-04-19 21:49:22 +00:00
Mark Dickinson 48f7a4aabb Correct documentation for math.pow;
0**nan is nan, not 0.  (But nan**0 and 1**nan are 1.)

Also fix minor typo: 'quite NaN' -> 'quiet NaN'
2008-04-19 21:35:35 +00:00
Benjamin Peterson a7d09031a0 Complete documentation for errors argument of io's open and TextIOWrapper 2008-04-19 19:47:34 +00:00
Benjamin Peterson 53be57e8f8 Copy io documentation back from py3k branch so changes can be merged into it. 2008-04-19 19:34:05 +00:00
Georg Brandl 2fb8a53645 #2631: clarify IMPORT_NAME semantics. 2008-04-19 16:59:16 +00:00
Georg Brandl f801b0f04c #2633: clarify meaning of env parameter. 2008-04-19 16:58:49 +00:00
Georg Brandl fb246c410b #2634: clarify meaning of env parameter to spawn/exec*e. 2008-04-19 16:58:28 +00:00
Georg Brandl 786ead684a #2369: clarify that copyfile() doesn't take a target directory. 2008-04-19 16:57:43 +00:00
Georg Brandl 734de68dd5 Fix-up docs for revision 62386. 2008-04-19 08:23:59 +00:00
Christian Heimes e74c8f2879 Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
2008-04-19 02:23:57 +00:00
Christian Heimes 6f34109384 I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
2008-04-18 23:13:07 +00:00
Andrew M. Kuchling 08923177b4 Rewrite introductory section, and remove old section. (It was already commented-out, but why keep it?) 2008-04-18 18:39:55 +00:00
Andrew M. Kuchling 02f63561a9 Remove personal note from Jim Roskind; it no longer applies, and the
e-mail address is for a previous employer.

Can we move the big long copyright statement into a sidebar or something?
2008-04-18 18:28:23 +00:00
Andrew M. Kuchling aea8d2e8cd Use correct parameter name 2008-04-18 02:40:47 +00:00
Andrew M. Kuchling e2e031394c Typo fixes 2008-04-17 20:44:06 +00:00
Jeroen Ruigrok van der Werven ea7fa72630 Be consistent in the use of read-only. 2008-04-17 12:39:45 +00:00
Raymond Hettinger 5eaffc4ce1 Issue 2648: Add leading zero to money format recipe in the docs. 2008-04-17 10:48:31 +00:00
Jeroen Ruigrok van der Werven 967a83c4ef Add details about the return value for mmap.flush(). 2008-04-16 12:57:43 +00:00
Jeroen Ruigrok van der Werven 069dfad2af Reformat to 80 columns prior to adding documentation. 2008-04-16 12:47:01 +00:00
Nick Coghlan 106fc48336 Issue 2439: add pkgutils.get_data() as a convenience wrapper for the PEP 302 get_data() API (contributed by Paul Moore) 2008-04-15 10:25:31 +00:00
Georg Brandl 4aa8df2871 Fix markup. 2008-04-13 07:07:44 +00:00
Benjamin Peterson 7bb4d2d0fa Backported io module docs 2008-04-13 02:01:27 +00:00
Brett Cannon e974689038 Re-implement the 'warnings' module in C. This allows for usage of the
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.

Closes issue #1631171.
2008-04-12 23:44:07 +00:00
Georg Brandl 8189310a7f #2615: small consistency update by Jeroen Ruigrok van der Werven. 2008-04-12 18:36:09 +00:00
Amaury Forgeot d'Arc 7adc776ea6 Issue 2408: remove the _types module
It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType),
when they can easily be obtained with python code.
These expressions even work with Jython.

I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 )
at least this change makes it simpler.
2008-04-08 22:07:05 +00:00
Andrew M. Kuchling 5b1070a32b Typo fix 2008-04-07 23:57:21 +00:00
Mark Summerfield 528576031d changed "2500 components" to "several thousand" since the number keeps
growning:-)
2008-04-07 07:39:23 +00:00
Georg Brandl 3b1202dfe8 Mention that the tuple returned by __reduce__ is pickled as normal. 2008-04-05 17:45:58 +00:00
Andrew M. Kuchling 1f2af8c6e4 Markup fix; explain what interval timers do; typo fix 2008-04-05 02:47:07 +00:00
Andrew M. Kuchling 9ff4aea24c Minor edits 2008-04-05 02:42:20 +00:00
Vinay Sajip 89a01cd44b Added updates with respect to recent changes to TimedRotatingFileHandler. 2008-04-02 21:17:25 +00:00
Benjamin Peterson 092a1f7ad7 PyErr_Warn is decrepated. Use PyErr_WarnEx 2008-03-31 21:57:13 +00:00
Georg Brandl c52ed59473 #2505: allow easier creation of AST nodes. 2008-03-30 07:01:47 +00:00
Gerhard Häring c15317efcd Documented the lastrowid attribute. 2008-03-29 19:11:52 +00:00
Georg Brandl 0069d85ba9 Fix capitalization. 2008-03-29 11:46:18 +00:00
Raymond Hettinger 594b76b7eb Be explicit about what efficient means. 2008-03-29 10:42:07 +00:00
Gerhard Häring 4130930b4c Brought documentation for sqlite3 module up-to-date. Fixed Issue1625205 which
complained about commit, rollback and close not being documented.
2008-03-29 01:27:37 +00:00
Georg Brandl d289ea6df9 #2502: add example how to do enum types with named tuples. 2008-03-28 12:58:26 +00:00
Georg Brandl 8ca6c84b6f Phase out has_key usage in the tutorial; correct docs for PyMapping_HasKey*. 2008-03-28 12:22:12 +00:00
Georg Brandl fc8eef3c78 Patch #1810 by Thomas Lee, reviewed by myself:
allow compiling Python AST objects into code objects
in compile().
2008-03-28 12:11:56 +00:00
Gregory P. Smith b9803421d2 Accept patch issue2426 by Paul Kippes (kippesp).
Adds sqlite3.Connection.iterdump to allow dumping of databases.
2008-03-28 08:32:09 +00:00
Georg Brandl 621cd26253 #2406: add examples to gzip docs. 2008-03-28 08:06:56 +00:00
Georg Brandl deaf2cafbd #2248: return result of QUIT from quit(). 2008-03-27 13:27:31 +00:00
Georg Brandl 27f43740b1 Add an example for an RFC 822 continuation. 2008-03-26 09:32:46 +00:00
Georg Brandl 799b372f31 #2476: document that %default feature is new in 2.4. 2008-03-25 08:39:10 +00:00
Georg Brandl 18f1914a02 #868845: document <...> reprs. 2008-03-25 07:20:15 +00:00
Martin v. Löwis aef18b1c67 Patch #2240: Implement signal.setitimer and signal.getitimer. 2008-03-24 13:31:16 +00:00
Georg Brandl 9bdead0aed #1700821: add a note to audioop docs about signedness of sample formats. 2008-03-24 09:34:34 +00:00
Raymond Hettinger d145240f9a Tighten documentation for Random.triangular. 2008-03-24 06:07:49 +00:00
Raymond Hettinger c4f7bab0a0 Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.
2008-03-23 19:37:53 +00:00
Raymond Hettinger bbc50eafe5 Issue 1681432: Add triangular distribution the random module. 2008-03-23 13:32:32 +00:00
Georg Brandl 61854332b9 Make the doctests presentation-friendlier. 2008-03-23 08:05:30 +00:00
Raymond Hettinger e70bb8d6f2 Simplify demo code. 2008-03-23 00:55:46 +00:00
Georg Brandl e8f1b00372 Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".
2008-03-22 22:04:10 +00:00
Georg Brandl 7a45ab826e Enable doctests in functions.rst. Already found two errors :) 2008-03-22 21:38:33 +00:00
Georg Brandl 4f0f34f131 Test doctests in operator docs. 2008-03-22 21:26:44 +00:00
Georg Brandl 3f04303ba4 Test doctests in datetime docs. 2008-03-22 21:21:57 +00:00
Georg Brandl 4c8bbe69e5 Make collections' doctests executable.
(The <BLANKLINE>s will be stripped from presentation output.)
2008-03-22 21:06:20 +00:00
Georg Brandl 3dd57815b2 Fix-up syntax problems. 2008-03-22 20:08:43 +00:00
Georg Brandl 838b4b0145 No need to specify explicit "doctest_block" anymore. 2008-03-22 13:07:06 +00:00
Georg Brandl 473f1642a4 Make more doctests in pprint docs testable. 2008-03-22 12:59:37 +00:00
Georg Brandl 6199e32a74 Make doctests in re docs usable with sphinx' doctest. 2008-03-22 12:04:26 +00:00
Georg Brandl 9f6623255b Test decimal.rst doctests as far as possible with sphinx doctest. 2008-03-22 11:47:10 +00:00
Georg Brandl 17baef0b7c Activate the Sphinx doctest extension and convert howto/functional to use it. 2008-03-22 10:56:23 +00:00
Georg Brandl 86f38c81ae #1918: document that weak references *to* an object are
cleared before the object's __del__ is called, to ensure that the weak
reference callback (if any) finds the object healthy.
2008-03-22 10:07:29 +00:00
Christian Heimes 0e9ab5f2f0 Applied patch #1657 epoll and kqueue wrappers for the select module
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue syscalls. Thanks to Thomas Herve and the Twisted people for their support and help.
TODO: Finish documentation documentation
2008-03-21 23:49:44 +00:00
Georg Brandl 5f79446af0 Add missing versionadded tag. 2008-03-21 21:05:03 +00:00
Georg Brandl d346475a0c Add docs for print_function and future_builtins. Fixes #2442. 2008-03-21 19:37:57 +00:00
Georg Brandl 3fbe20c01e Add docs for __func__ and __self__ on methods. 2008-03-21 19:20:21 +00:00
Georg Brandl 06291185e1 Fix a code block in __future__ docs. 2008-03-21 19:14:38 +00:00
Marc-André Lemburg 4e0c72bbf0 Clarfiy the availability of the extended support for win32_ver() in Py2.6. 2008-03-20 18:58:14 +00:00
Marc-André Lemburg 53c7a60379 Add documentation for updated Windows support in win32_ver().
Add documentation for linux_distribution() API.
2008-03-20 17:55:31 +00:00
Sean Reifscheider 45ea86c124 Issue 2188: Documentation hint about disabling proxy detection. 2008-03-20 03:20:48 +00:00
Gregory P. Smith a5cfcad0e3 Prevent ioctl op codes from being sign extended from int to unsigned long
when used on platforms that actually define ioctl as taking an unsigned long.
(the BSDs and OS X / Darwin)

Adds a unittest for fcntl.ioctl that tests what happens with both positive and
negative numbers.

This was done because of issue1471 but I'm not able to reproduce -that- problem
in the first place on Linux 32bit or 64bit or OS X 10.4 & 10.5 32bit or 64 bit.
2008-03-19 23:03:25 +00:00
Georg Brandl 97e863eaf8 Another one. 2008-03-19 07:57:57 +00:00
Georg Brandl 482d752dcb Remove footnote from versionchanged as it upsets LaTeX. 2008-03-19 07:56:40 +00:00
Gregory P. Smith bde40078b0 Mention that crc32 and adler32 are available in a different module (zlib).
Some people look for them in hashlib.
2008-03-19 01:38:35 +00:00
Steven Bethard 6f778cfb5b Document unicode.isnumeric() and unicode.isdecimal() (issue2326) 2008-03-17 19:33:11 +00:00
Gregory P. Smith f48f9d38c0 Force zlib.crc32 and zlib.adler32 to return a signed integer on all platforms
regardless of the native sizeof(long) used in the integer object.

This somewhat odd behavior of returning a signed is maintained in 2.x for
compatibility reasons of always returning an integer rather than a long object.

Fixes Issue1202 for Python 2.6
2008-03-17 18:48:05 +00:00
Mark Summerfield 43da35de7b Added a footnote to each pointing out that for XML output if an encoding
string is given it should conform to the appropriate XML standards---for
example, "UTF-8" is okay, but "UTF8" is not.
2008-03-17 08:28:15 +00:00
Vinay Sajip 91f0ee4db6 Clarified documentation on use of shutdown(). 2008-03-16 21:35:58 +00:00
Raymond Hettinger a6cfeb4b9d Update docs to reflect removal of Exact/Inexact 2008-03-16 05:20:42 +00:00
Skip Montanaro fc070d2731 add %f format to datetime - issue 1158 2008-03-15 16:04:45 +00:00
Skip Montanaro 75e51680f1 note that fork and forkpty raise OSError on failure 2008-03-15 02:32:49 +00:00
Georg Brandl 0267781742 Fix lots of broken links in the docs, found by Sphinx' external link checker. 2008-03-15 00:20:19 +00:00
Georg Brandl bd77681f36 Remove obsolete paragraph. #2288. 2008-03-14 23:10:34 +00:00
Raymond Hettinger 53bdf09343 Issue 2274: Add heapq.heappushpop(). 2008-03-13 19:03:51 +00:00
Georg Brandl 2e25551ef8 #1720705: add docs about import/threading interaction, wording by Nick. 2008-03-13 07:21:41 +00:00
Georg Brandl 4bb40b9428 #2270: fix typo. 2008-03-13 07:17:14 +00:00
Georg Brandl d85a13a954 #2265: fix example. 2008-03-13 07:15:56 +00:00
Raymond Hettinger 513460f80d Improve docs for itemgetter(). Show that it works with slices. 2008-03-11 21:37:46 +00:00
Raymond Hettinger e8b4b60555 Add recipe to docs. 2008-03-11 00:19:07 +00:00
Georg Brandl c557db5268 #2249: document assertTrue and assertFalse. 2008-03-09 15:11:39 +00:00
Facundo Batista c54aec1fda Issue 1106316. post_mortem()'s parameter, traceback, is now
optional: it defaults to the traceback of the exception that is currently
being handled.
2008-03-08 16:50:27 +00:00
Andrew M. Kuchling 31c6de4f79 Grammar fix 2008-03-07 21:09:23 +00:00
Nick Coghlan 7af53be66f Speed up with statements by storing the __exit__ method on the stack instead of in a temp variable (bumps the magic number for pyc files) 2008-03-07 14:13:28 +00:00
Jeffrey Yasskin e75f59a578 Progress on issue #1193577 by adding a polling .shutdown() method to
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
2008-03-07 06:22:15 +00:00
Raymond Hettinger 38fb9bee6c Tweak recipes and tests 2008-03-07 01:33:20 +00:00
Georg Brandl a7bd27f0a8 #2225: return nonzero status code from py_compile if not all files could be compiled. 2008-03-06 07:41:16 +00:00
Georg Brandl 70992c3c83 Expand on re.split behavior with captured expressions. 2008-03-06 07:19:15 +00:00
Raymond Hettinger 040f10e9b3 Add examples. 2008-03-06 01:15:52 +00:00
Thomas Heller f3c0559b5e Issue 1872: Changed the struct module typecode from 't' to '?', for
compatibility with PEP3118.
2008-03-05 15:34:29 +00:00
Raymond Hettinger d553d856e7 Beef-up docs and tests for itertools. Fix-up end-case for product(). 2008-03-04 04:17:08 +00:00
Andrew M. Kuchling 3fe1843cee Add versionadded tags 2008-03-04 01:49:37 +00:00
Andrew M. Kuchling 684868ac90 Fix sentence fragment 2008-03-04 01:47:38 +00:00
Andrew M. Kuchling ece10b4004 Grammar fix; markup fix 2008-03-04 01:30:10 +00:00
Georg Brandl 3e9d66fee1 There are now sixteen isfoo functions. 2008-03-03 20:37:55 +00:00
Christian Heimes 608c1d8e87 Since abc._Abstract was replaces by a new type flags the regression test suite fails. I've added a new function inspect.isabstract(). Is the mmethod fine or should I check if object is a instance of type or subclass of object, too? 2008-03-03 18:28:04 +00:00
Georg Brandl e6dab2a077 Fix factual error. 2008-03-02 14:15:04 +00:00
Georg Brandl 72780a4b0c Make clear that the constants are strings. 2008-03-02 13:41:39 +00:00
Raymond Hettinger 2b7a5c468b Tighten example code. 2008-03-02 11:17:51 +00:00
Raymond Hettinger f287f17779 Finish-up docs for combinations() and permutations() in itertools. 2008-03-02 10:59:31 +00:00
Raymond Hettinger 330958e647 Document impending updates to itertools. 2008-02-28 19:41:24 +00:00
Raymond Hettinger 18750ab2a0 Add repeat keyword argument to itertools.product(). 2008-02-28 09:23:48 +00:00
Raymond Hettinger c105289ec4 Simply the sample code for combinations(). 2008-02-27 01:44:34 +00:00
Raymond Hettinger 93e804da9c Add itertools.combinations(). 2008-02-26 23:40:50 +00:00
Neal Norwitz ca37661a69 Add a timing flag to Trace so you can see where slowness occurs
like waiting for socket timeouts in test_smtplib :-).
2008-02-26 08:21:28 +00:00
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
Brett Cannon 499969a08c Add minor markup for a string. 2008-02-25 05:33:07 +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
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 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
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 5e203f56db #2131: note that codecs.open() always opens files in binary mode. 2008-02-17 11:33:38 +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