Commit graph

1744 commits

Author SHA1 Message Date
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
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
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
9749e15e2f Remove with_statement future imports from 2.6 docs. 2008-01-05 19:28:16 +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
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
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
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
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
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
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
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
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
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
Skip Montanaro
546624609e correct email address 2007-12-08 15:26:16 +00:00