]> granicus.if.org Git - python/log
python
17 years agoApplied my patch #1455 with some extra fixes for VS 2005
Christian Heimes [Mon, 3 Dec 2007 13:47:29 +0000 (13:47 +0000)]
Applied my patch #1455 with some extra fixes for VS 2005
The new msvc9compiler module supports VS 2005 and VS 2008. I've also fixed build_ext to support PCbuild8 and PCbuild9 and backported my fix for xxmodule.c from py3k. The old code msvccompiler is still in place in case somebody likes to build an extension with VS 2003 or earlier.
I've also updated the cygwin compiler module for VS 2005 and VS 2008. It works with VS 2005 but I'm unable to test it with VS 2008. We have to wait for a new version of cygwin.

17 years agoImplement PEP 366
Nick Coghlan [Mon, 3 Dec 2007 12:55:17 +0000 (12:55 +0000)]
Implement PEP 366

17 years agoAdd documentation for PySys_* functions.
Georg Brandl [Sun, 2 Dec 2007 21:58:54 +0000 (21:58 +0000)]
Add documentation for PySys_* functions.
Written by Charlie Shepherd for GHOP. Also fixes #1245.

17 years agoFix a sentence I missed before. Do not merge to 3k.
Georg Brandl [Sun, 2 Dec 2007 18:17:50 +0000 (18:17 +0000)]
Fix a sentence I missed before. Do not merge to 3k.

17 years agoAdd more entries to the glossary.
Georg Brandl [Sun, 2 Dec 2007 14:58:50 +0000 (14:58 +0000)]
Add more entries to the glossary.

Written by Jeff Wheeler for GHOP.

17 years agoConvert bdb.rst line endings to Unix style.
Georg Brandl [Sun, 2 Dec 2007 14:37:29 +0000 (14:37 +0000)]
Convert bdb.rst line endings to Unix style.

17 years agoAdd example to mmap docs.
Georg Brandl [Sun, 2 Dec 2007 14:34:34 +0000 (14:34 +0000)]
Add example to mmap docs.
Written for GHOP by Rafal Rawicki.

17 years agoAdd "Using Python on Windows" document, by Robert Lehmann.
Georg Brandl [Sat, 1 Dec 2007 23:12:45 +0000 (23:12 +0000)]
Add "Using Python on Windows" document, by Robert Lehmann.
Written for GHOP.

17 years agoAdd examples to the ElementTree documentation.
Georg Brandl [Sat, 1 Dec 2007 22:42:46 +0000 (22:42 +0000)]
Add examples to the ElementTree documentation.
Written by h4wk.cz for GHOP.

17 years agoAdd test suite for cmd module.
Georg Brandl [Sat, 1 Dec 2007 22:38:48 +0000 (22:38 +0000)]
Add test suite for cmd module.

Written by Michael Schneider for GHOP.

17 years agoAdd a few refcount data entries.
Georg Brandl [Sat, 1 Dec 2007 22:27:56 +0000 (22:27 +0000)]
Add a few refcount data entries.

17 years agoDocument PyEval_* functions from ceval.c.
Georg Brandl [Sat, 1 Dec 2007 22:24:47 +0000 (22:24 +0000)]
Document PyEval_* functions from ceval.c.

Credits to Michael Sloan from GHOP.

17 years agoIssue #1531: Read fileobj from the current offset, do not seek to
Lars Gustäbel [Sat, 1 Dec 2007 21:02:12 +0000 (21:02 +0000)]
Issue #1531: Read fileobj from the current offset, do not seek to
the start.

(will backport to 2.5)

17 years agoAdded one more missing versionadded tag
Christian Heimes [Sat, 1 Dec 2007 15:40:22 +0000 (15:40 +0000)]
Added one more missing versionadded tag

17 years agoAdd versionadded tags missing in r59254. Do NOT merge to Py3k.
Georg Brandl [Sat, 1 Dec 2007 13:23:04 +0000 (13:23 +0000)]
Add versionadded tags missing in r59254. Do NOT merge to Py3k.

17 years agoFeature #1534
Christian Heimes [Sat, 1 Dec 2007 11:20:10 +0000 (11:20 +0000)]
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.

17 years agoAlthough pyconfig.h claims that WIN32 is obsolete it is still required for the locale...
Christian Heimes [Sat, 1 Dec 2007 01:03:20 +0000 (01:03 +0000)]
Although pyconfig.h claims that WIN32 is obsolete it is still required for the locale module. locale.getdefaultlocale() fails silently w/o the WIN32 macro.

17 years agoBackport of -r59242:59246 from py3k
Christian Heimes [Fri, 30 Nov 2007 22:36:10 +0000 (22:36 +0000)]
Backport of -r59242:59246 from py3k
Fixed problem with regrtest caused by the additional of objects to _abcoll.

17 years agoMove lchmod() docs to correct place, and add versionadded tags.
Georg Brandl [Fri, 30 Nov 2007 22:04:45 +0000 (22:04 +0000)]
Move lchmod() docs to correct place, and add versionadded tags.

17 years agoFix for feature request #1528 Add os.fchmod
Christian Heimes [Fri, 30 Nov 2007 21:11:28 +0000 (21:11 +0000)]
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.

17 years agoIssue #1521: on 64bit platforms, str.decode fails on very long strings.
Amaury Forgeot d'Arc [Fri, 30 Nov 2007 20:51:40 +0000 (20:51 +0000)]
Issue #1521: on 64bit platforms, str.decode fails on very long strings.
The t# and w# formats were not correctly handled.

Will backport.

17 years agoAdd a NEWS entry for r59231
Amaury Forgeot d'Arc [Fri, 30 Nov 2007 20:37:22 +0000 (20:37 +0000)]
Add a NEWS entry for r59231

17 years agoRemoved or replaced some more deprecated preprocessor macros.
Christian Heimes [Fri, 30 Nov 2007 19:18:08 +0000 (19:18 +0000)]
Removed or replaced some more deprecated preprocessor macros.
Moved the _DEBUG and NDEBUG macros to two new property files.
Fixed #1527 Problem with static libs on Windows
Updated README.txt

17 years agoReordering of __new__ to minimize isinstance() calls to most
Facundo Batista [Fri, 30 Nov 2007 17:15:25 +0000 (17:15 +0000)]
Reordering of __new__ to minimize isinstance() calls to most
used types. Thanks Mark Dickinson.

17 years agoIssue #1402: PyInterpreterState_Clear() may still invoke user code
Amaury Forgeot d'Arc [Thu, 29 Nov 2007 23:35:25 +0000 (23:35 +0000)]
Issue #1402: PyInterpreterState_Clear() may still invoke user code
(in deallocation of running threads, for example), so the PyGILState_Release()
function must still be functional.
On the other hand, _PyGILState_Fini() only frees memory, and can be called later.

Backport candidate, but only after some experts comment on it.

17 years agoAdd more examples to the wsgiref docs.
Georg Brandl [Thu, 29 Nov 2007 23:00:03 +0000 (23:00 +0000)]
Add more examples to the wsgiref docs.
From GHOP by Josip Dzolonga.

17 years agovc2008: Move python.vcproj first in the solution file, so that
Amaury Forgeot d'Arc [Thu, 29 Nov 2007 20:24:36 +0000 (20:24 +0000)]
vc2008: Move python.vcproj first in the solution file, so that
it becomes the default startup project when opening the file
for the first time.

17 years agoSpaces vs. Tabs.
Georg Brandl [Thu, 29 Nov 2007 18:33:01 +0000 (18:33 +0000)]
Spaces vs. Tabs.

17 years agoFix bug #1517, a segfault in lookdict().
Guido van Rossum [Thu, 29 Nov 2007 18:25:12 +0000 (18:25 +0000)]
Fix bug #1517, a segfault in lookdict().

17 years agoAdd examples to the ConfigParser documentation.
Georg Brandl [Thu, 29 Nov 2007 17:02:34 +0000 (17:02 +0000)]
Add examples to the ConfigParser documentation.

Credits go to Thomas Lamb, who wrote this as a task in the GHOP contest.

17 years agoFix reference target.
Georg Brandl [Thu, 29 Nov 2007 17:01:20 +0000 (17:01 +0000)]
Fix reference target.

17 years agoAdded py3kwarning to the documentation of the sys module.
Christian Heimes [Wed, 28 Nov 2007 08:02:36 +0000 (08:02 +0000)]
Added py3kwarning to the documentation of the sys module.

17 years agoI forgot to fix one occurence of new in test_descr
Christian Heimes [Tue, 27 Nov 2007 23:53:14 +0000 (23:53 +0000)]
I forgot to fix one occurence of new in test_descr

17 years agoExpose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504
Christian Heimes [Tue, 27 Nov 2007 23:16:44 +0000 (23:16 +0000)]
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.

17 years agoPatch # 1507 by Mark Dickinson. Make complex(x, -0) retain the sign of
Guido van Rossum [Tue, 27 Nov 2007 22:38:36 +0000 (22:38 +0000)]
Patch # 1507 by Mark Dickinson.  Make complex(x, -0) retain the sign of
the imaginary part (as long as it's not complex).
Backport candidate?

17 years agoAdded a deprecation warning to the 'new' module.
Christian Heimes [Tue, 27 Nov 2007 21:35:44 +0000 (21:35 +0000)]
Added a deprecation warning to the 'new' module.

17 years agoReplaced import of the 'new' module with 'types' module and added a deprecation warni...
Christian Heimes [Tue, 27 Nov 2007 21:34:01 +0000 (21:34 +0000)]
Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.

17 years agoBackport of changes to PCbuild9 from the py3k branch
Christian Heimes [Tue, 27 Nov 2007 21:28:40 +0000 (21:28 +0000)]
Backport of changes to PCbuild9 from the py3k branch

17 years agoMoved the errno import from inside the functions to the
Facundo Batista [Tue, 27 Nov 2007 18:50:12 +0000 (18:50 +0000)]
Moved the errno import from inside the functions to the
module level.  Fixes issue 1755179.

17 years agoRemove unused global variable, and remove unneeded COMError.__str__
Thomas Heller [Tue, 27 Nov 2007 12:22:11 +0000 (12:22 +0000)]
Remove unused global variable, and remove unneeded COMError.__str__
implementation in C.

17 years agoA thread-less variant of brownian.py, submitted by Michele Simoniato.
Guido van Rossum [Mon, 26 Nov 2007 22:16:49 +0000 (22:16 +0000)]
A thread-less variant of brownian.py, submitted by Michele Simoniato.

17 years agoBug #1494: Document that appendChild removes first.
Martin v. Löwis [Sat, 24 Nov 2007 18:33:40 +0000 (18:33 +0000)]
Bug #1494: Document that appendChild removes first.

17 years agoback in these go - thanks to Titus Brown for the fix
Skip Montanaro [Sat, 24 Nov 2007 14:30:47 +0000 (14:30 +0000)]
back in these go - thanks to Titus Brown for the fix

17 years ago#1735632: add O_NOATIME constant to os module.
Georg Brandl [Sat, 24 Nov 2007 13:56:09 +0000 (13:56 +0000)]
#1735632: add O_NOATIME constant to os module.
Also document a few other O_ constants that were missing from documentation.

17 years agoIssue #1445: Fix a SystemError when accessing the ``cell_contents``
Amaury Forgeot d'Arc [Sat, 24 Nov 2007 13:44:17 +0000 (13:44 +0000)]
Issue #1445: Fix a SystemError when accessing the ``cell_contents``
attribute of an empty cell object.  Now a ValueError is raised.

17 years agoWarning "<> not supported in 3.x" should be enabled only when the -3 option is set.
Amaury Forgeot d'Arc [Sat, 24 Nov 2007 13:20:22 +0000 (13:20 +0000)]
Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.

17 years ago#1355: remove mention of PyXML from xml.dom docs.
Georg Brandl [Sat, 24 Nov 2007 11:42:14 +0000 (11:42 +0000)]
#1355: remove mention of PyXML from xml.dom docs.

17 years ago#1467: fix documentation for TestResult.add{Error,Failure}.
Georg Brandl [Sat, 24 Nov 2007 11:39:13 +0000 (11:39 +0000)]
#1467: fix documentation for TestResult.add{Error,Failure}.

17 years ago#1344: document that you need to open std{in,out,err} with PIPE if you want
Georg Brandl [Sat, 24 Nov 2007 11:31:46 +0000 (11:31 +0000)]
#1344: document that you need to open std{in,out,err} with PIPE if you want
communicate() to work as described.

17 years agorevert
Skip Montanaro [Sat, 24 Nov 2007 04:31:15 +0000 (04:31 +0000)]
revert

17 years agorevert change that breaks test_doctest (which I forgot to run - sorry)
Skip Montanaro [Sat, 24 Nov 2007 04:29:08 +0000 (04:29 +0000)]
revert change that breaks test_doctest (which I forgot to run - sorry)

17 years agoBackport of fixes from py3k branch
Christian Heimes [Sat, 24 Nov 2007 01:53:59 +0000 (01:53 +0000)]
Backport of fixes from py3k branch
svn merge -r59131:HEAD ../../py3k/PCbuild9/ .

17 years agoAdded filename to compiling struct based on Martin's suggestion.
Christian Heimes [Sat, 24 Nov 2007 01:36:02 +0000 (01:36 +0000)]
Added filename to compiling struct based on Martin's suggestion.
I'm wonder why I was trying to add the filename to the node all the time. The compiling struct is more obvious.

17 years agoTest cases from Cowlishaw, v2.57. All are pased cleanly.
Facundo Batista [Fri, 23 Nov 2007 18:14:50 +0000 (18:14 +0000)]
Test cases from Cowlishaw, v2.57. All are pased cleanly.

17 years agoMajor change in the internal structure of the Decimal
Facundo Batista [Fri, 23 Nov 2007 17:59:00 +0000 (17:59 +0000)]
Major change in the internal structure of the Decimal
number: now it does not store the mantissa as a tuple
of numbers, but as a string.

This avoids a lot of conversions, and achieves a
speedup of 40%. The API remains intact.

Thanks Mark Dickinson.

17 years agoissue 1429818
Skip Montanaro [Fri, 23 Nov 2007 17:12:47 +0000 (17:12 +0000)]
issue 1429818

17 years agoMake trace and doctest play nice together (issue 1429818). Will backport.
Skip Montanaro [Fri, 23 Nov 2007 17:08:35 +0000 (17:08 +0000)]
Make trace and doctest play nice together (issue 1429818).  Will backport.

17 years agoAdd item
Andrew M. Kuchling [Fri, 23 Nov 2007 13:37:39 +0000 (13:37 +0000)]
Add item

17 years agoAnd yet another fix for the patch. Paul Moore has send me a note that I've missed...
Christian Heimes [Fri, 23 Nov 2007 13:25:31 +0000 (13:25 +0000)]
And yet another fix for the patch. Paul Moore has send me a note that I've missed a declaration. The additional code has moved the declaration in the middle of the block.

17 years agoHow did the comment get there?
Christian Heimes [Fri, 23 Nov 2007 12:16:35 +0000 (12:16 +0000)]
How did the comment get there?

17 years agoFixed problems in the last commit. Filenames and line numbers weren't reported correctly.
Christian Heimes [Fri, 23 Nov 2007 12:12:02 +0000 (12:12 +0000)]
Fixed problems in the last commit. Filenames and line numbers weren't reported correctly.
Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.

17 years agoApplied patch #1754273 and #1754271 from Thomas Glee
Christian Heimes [Fri, 23 Nov 2007 09:10:36 +0000 (09:10 +0000)]
Applied patch #1754273 and #1754271 from Thomas Glee
The patches are adding deprecation warnings for back ticks and <>

17 years agoBackport of PCbuild9 fixes from py3k r59130
Christian Heimes [Fri, 23 Nov 2007 07:05:03 +0000 (07:05 +0000)]
Backport of PCbuild9 fixes from py3k r59130

17 years agoFix a bug in the test for using __loader__.get_data().
Brett Cannon [Fri, 23 Nov 2007 00:06:51 +0000 (00:06 +0000)]
Fix a bug in the test for using __loader__.get_data().

17 years agoBackport of the PCbuild9 directory from the py3k branch.
Christian Heimes [Thu, 22 Nov 2007 11:21:16 +0000 (11:21 +0000)]
Backport of the PCbuild9 directory from the py3k branch.
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)

17 years agoBackport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum [Thu, 22 Nov 2007 00:55:51 +0000 (00:55 +0000)]
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
With some changes of my own thrown in (e.g. backport of r58107).

17 years agoFinal fix for #1403
Christian Heimes [Wed, 21 Nov 2007 02:50:06 +0000 (02:50 +0000)]
Final fix for #1403
The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.

17 years agoAdd a NEWS entry for r59076.
Amaury Forgeot d'Arc [Wed, 21 Nov 2007 01:38:26 +0000 (01:38 +0000)]
Add a NEWS entry for r59076.

17 years agoAdded NEWS entry
Christian Heimes [Wed, 21 Nov 2007 01:17:28 +0000 (01:17 +0000)]
Added NEWS entry
Thanks for the reminder, Brett

17 years agoAdd a missing check before deleting a package's __loader__.
Brett Cannon [Wed, 21 Nov 2007 00:58:03 +0000 (00:58 +0000)]
Add a missing check before deleting a package's __loader__.

17 years agodoctest assumed that a package's __loader__.get_data() method used universal
Brett Cannon [Wed, 21 Nov 2007 00:47:36 +0000 (00:47 +0000)]
doctest assumed that a package's __loader__.get_data() method used universal
newlines; it doesn't.  To rectify this the string returned replaces all
instances of os.linesep with '\n' to fake universal newline support.

Backport candidate.

17 years agoFixed #1372: zlibmodule.c: int overflow in PyZlib_decompress
Christian Heimes [Wed, 21 Nov 2007 00:46:21 +0000 (00:46 +0000)]
Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress

17 years agoRemove a unneeded line that had typos.
Brett Cannon [Wed, 21 Nov 2007 00:16:20 +0000 (00:16 +0000)]
Remove a unneeded line that had typos.

17 years agoThe incremental decoder for utf-7 must preserve its state between calls.
Amaury Forgeot d'Arc [Tue, 20 Nov 2007 23:31:27 +0000 (23:31 +0000)]
The incremental decoder for utf-7 must preserve its state between calls.
Solves issue1460.

Might not be a backport candidate: a new API function was added,
and some code may rely on details in utf-7.py.

17 years agoBackport some main.c cleanup from the py3k branch
Nick Coghlan [Tue, 20 Nov 2007 14:55:57 +0000 (14:55 +0000)]
Backport some main.c cleanup from the py3k branch

17 years agoAnother fix for test_shutil. Martin pointed out that it breaks some build bots
Christian Heimes [Tue, 20 Nov 2007 03:21:02 +0000 (03:21 +0000)]
Another fix for test_shutil. Martin pointed out that it breaks some build bots

17 years agoPatch #1468: Package Lib/test/*.pem.
Martin v. Löwis [Tue, 20 Nov 2007 02:46:02 +0000 (02:46 +0000)]
Patch #1468: Package Lib/test/*.pem.

17 years agoFixed bug #1470
Christian Heimes [Tue, 20 Nov 2007 01:48:48 +0000 (01:48 +0000)]
Fixed bug #1470

17 years agoFix the OSX failures in this test -- they were due to /tmp being a symlink
Guido van Rossum [Mon, 19 Nov 2007 17:50:22 +0000 (17:50 +0000)]
Fix the OSX failures in this test -- they were due to /tmp being a symlink
to /private/tmp.  Adding a call to os.path.realpath() to temp_dir() fixed it.

17 years agoMake this work stand-alone, too.
Guido van Rossum [Mon, 19 Nov 2007 17:35:24 +0000 (17:35 +0000)]
Make this work stand-alone, too.

17 years agoFixed detail in add_type() explanation (issue 1463).
Facundo Batista [Mon, 19 Nov 2007 16:30:24 +0000 (16:30 +0000)]
Fixed detail in add_type() explanation (issue 1463).

17 years agoEnable some test_cmd_line_script debugging output to investigate failure on Mac OSX...
Nick Coghlan [Mon, 19 Nov 2007 13:56:27 +0000 (13:56 +0000)]
Enable some test_cmd_line_script debugging output to investigate failure on Mac OSX buildbot

17 years agoFix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
Walter Dörwald [Mon, 19 Nov 2007 12:41:10 +0000 (12:41 +0000)]
Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
calling codecs.utf_8_decode() with final==True, which falled with incomplete
byte sequences. Fix and test by James G. Sack.

17 years agoFix typo in comment.
Walter Dörwald [Mon, 19 Nov 2007 12:14:05 +0000 (12:14 +0000)]
Fix typo in comment.

17 years agoUse a slightly more recent version than 1.5.2b2.
Neal Norwitz [Mon, 19 Nov 2007 01:46:20 +0000 (01:46 +0000)]
Use a slightly more recent version than 1.5.2b2.

17 years agoPatch #1739468: Directories and zipfiles containing __main__.py are now executable
Nick Coghlan [Sun, 18 Nov 2007 11:56:28 +0000 (11:56 +0000)]
Patch #1739468: Directories and zipfiles containing __main__.py are now executable

17 years agoRemove a confusing sentence about pth files and which directories are searched
Brett Cannon [Sat, 17 Nov 2007 07:07:29 +0000 (07:07 +0000)]
Remove a confusing sentence about pth files and which directories are searched
for them.

Closes issue #1431.  Thanks Giambattista Bloisi for the help.

17 years agoFix signature in example
Raymond Hettinger [Sat, 17 Nov 2007 01:51:22 +0000 (01:51 +0000)]
Fix signature in example

17 years agoMade _ParseTupleFinds only defined to unicodeobject.c
Facundo Batista [Fri, 16 Nov 2007 19:16:15 +0000 (19:16 +0000)]
Made _ParseTupleFinds only defined to unicodeobject.c

17 years agoFix for stupid error (I need to remember to do a full 'make clean + make'
Facundo Batista [Fri, 16 Nov 2007 18:41:24 +0000 (18:41 +0000)]
Fix for stupid error (I need to remember to do a full 'make clean + make'
cycle before the tests...). Sorry.

17 years agoNow in find, rfind, index, and rindex, you can use None as defaults,
Facundo Batista [Fri, 16 Nov 2007 18:04:14 +0000 (18:04 +0000)]
Now in find, rfind, index, and rindex, you can use None as defaults,
as usual with slicing (both with str and unicode strings).  This
fixes issue 1259.

For str only the stringobject.c file was modified.  But for unicode,
I needed to repeat in the four functions a lot of code, so created
a new function that does part of the job for them (and placed it in
find.h, following a suggestion of Barry).

Also added tests for this behaviour.

17 years agoA patch from issue 1378 by roudkerk:
Guido van Rossum [Fri, 16 Nov 2007 00:24:44 +0000 (00:24 +0000)]
A patch from issue 1378 by roudkerk:

Currently on Windows set_error() make use of a large array which maps
socket error numbers to error messages.

This patch removes that array and just lets PyErr_SetExcFromWindowsErr()
generate the message by using the Win32 function FormatMessage().

17 years agoadd the certificate for the Python SVN repository for testing SSL
Bill Janssen [Thu, 15 Nov 2007 23:03:03 +0000 (23:03 +0000)]
add the certificate for the Python SVN repository for testing SSL

17 years agoAdd example for use cases requiring default values.
Raymond Hettinger [Thu, 15 Nov 2007 22:39:34 +0000 (22:39 +0000)]
Add example for use cases requiring default values.

17 years agoExample of multiple replacements.
Raymond Hettinger [Thu, 15 Nov 2007 03:16:09 +0000 (03:16 +0000)]
Example of multiple replacements.

17 years agoFixup example in docs.
Raymond Hettinger [Thu, 15 Nov 2007 02:58:20 +0000 (02:58 +0000)]
Fixup example in docs.

17 years agoSmall improvement to the implementation of __replace__().
Raymond Hettinger [Thu, 15 Nov 2007 02:55:42 +0000 (02:55 +0000)]
Small improvement to the implementation of __replace__().

17 years agoAccept Issac Morland's suggestion for __replace__ to allow multiple replacements
Raymond Hettinger [Thu, 15 Nov 2007 02:44:53 +0000 (02:44 +0000)]
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.

17 years agoAdd test for __fields__ being read-only
Raymond Hettinger [Wed, 14 Nov 2007 23:02:30 +0000 (23:02 +0000)]
Add test for __fields__ being read-only

17 years agoMake __fields__ read-only. Suggested by Issac Morland
Raymond Hettinger [Wed, 14 Nov 2007 22:56:16 +0000 (22:56 +0000)]
Make __fields__ read-only.  Suggested by Issac Morland