Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af72d52

Browse files
committed
Add newsitem for the two new unittest methods.
Also, made some whitespace cleanup.
1 parent 79f5783 commit af72d52

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

Misc/NEWS

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ Extension modules
437437
Library
438438
-------
439439

440+
- unittest.py now has two additional methods called assertAlmostEqual()
441+
and failIfAlmostEqual(). They implement an approximate comparision
442+
by rounding the difference between the two arguments and comparing
443+
the result to zero. Approximate comparision is essential for
444+
unit tests of floating point results.
445+
440446
- calendar.py now depends on the new datetime module rather than
441447
the time module. As a result, the range of allowable dates
442448
has been increased.
@@ -964,43 +970,43 @@ Mac
964970
with an interpreter living in such a .app bundle, this interpreter should
965971
be used to run any Python script using the window manager (including
966972
Tkinter or wxPython scripts).
967-
973+
968974
- A new utility PythonLauncher will start a Python interpreter when a .py or
969975
.pyw script is double-clicked in the Finder. By default .py scripts are
970976
run with a normal Python interpreter in a Terminal window and .pyw
971977
files are run with a window-aware pythonw interpreter without a Terminal
972978
window, but all this can be customized.
973-
979+
974980
- MacPython-OS9 is now Carbon-only, so it runs on Mac OS 9 or Mac OS X and
975981
possibly on Mac OS 8.6 with the right CarbonLib installed, but not on earlier
976982
releases.
977-
983+
978984
- Many tools such as BuildApplet.py and gensuitemodule.py now support a command
979985
line interface too.
980-
986+
981987
- All the Carbon classes are now PEP253 compliant, meaning that you can
982988
subclass them from Python. Most of the attributes have gone, you should
983989
now use the accessor function call API, which is also what Apple's
984990
documentation uses. Some attributes such as grafport.visRgn are still
985991
available for convenience.
986-
992+
987993
- New Carbon modules File (implementing the APIs in Files.h and Aliases.h)
988994
and Folder (APIs from Folders.h). The old macfs builtin module is
989995
gone, and replaced by a Python wrapper around the new modules.
990996

991997
- Pathname handling should now be fully consistent: MacPython-OSX always uses
992998
unix pathnames and MacPython-OS9 always uses colon-separated Mac pathnames
993999
(also when running on Mac OS X).
994-
1000+
9951001
- New Carbon modules Help and AH give access to the Carbon Help Manager.
9961002
There are hooks in the IDE to allow accessing the Python documentation
9971003
(and Apple's Carbon and Cocoa documentation) through the Help Viewer.
9981004
See Mac/OSX/README for converting the Python documentation to a
9991005
Help Viewer comaptible form and installing it.
1000-
1006+
10011007
- OSA support has been redesigned and the generated Python classes now
10021008
mirror the inheritance defined by the underlying OSA classes.
1003-
1009+
10041010
- MacPython no longer maps both \r and \n to \n on input for any text file.
10051011
This feature has been replaced by universal newline support (PEP278).
10061012

@@ -1645,13 +1651,13 @@ Windows
16451651
signal.signal(signal.SIGBREAK, signal.default_int_handler)
16461652

16471653
try:
1648-
while 1:
1649-
pass
1654+
while 1:
1655+
pass
16501656
except KeyboardInterrupt:
1651-
# We get here on Ctrl+C or Ctrl+Break now; if we had not changed
1652-
# SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
1653-
# program without the possibility for any Python-level cleanup).
1654-
print "Clean exit"
1657+
# We get here on Ctrl+C or Ctrl+Break now; if we had not changed
1658+
# SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
1659+
# program without the possibility for any Python-level cleanup).
1660+
print "Clean exit"
16551661

16561662

16571663
What's New in Python 2.2a4?
@@ -2008,7 +2014,7 @@ C API
20082014

20092015
double x = PyLong_AsDouble(some_long_object);
20102016
if (x == -1.0 && PyErr_Occurred()) {
2011-
/* The conversion failed. */
2017+
/* The conversion failed. */
20122018
}
20132019

20142020
- The GC API has been changed. Extensions that use the old API will still

0 commit comments

Comments
 (0)