Commit Graph

175 Commits

Author SHA1 Message Date
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
Georg Brandl e40a6a85ee Add examples to the datetime documentation. Written for GHOP by "h4wk.cz". 2007-12-08 11:23:13 +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 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 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
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 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
Christian Heimes 3e76d9346b Added one more missing versionadded tag 2007-12-01 15:40:22 +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