python
17 years agoChange simple instances (in Fraction) of self.numerator and self.denominator to
Jeffrey Yasskin [Thu, 14 Feb 2008 07:49:25 +0000 (07:49 +0000)]
Change simple instances (in Fraction) of self.numerator and self.denominator to
self._numerator and self._denominator. This speeds abs() up from 12.2us to
10.8us and trunc() from 2.07us to 1.11us. This doesn't change _add and friends
because they're more complicated.

17 years agoPerformance optimizations on Fraction's constructor.
Jeffrey Yasskin [Thu, 14 Feb 2008 06:12:24 +0000 (06:12 +0000)]
Performance optimizations on Fraction's constructor.

  ./python.exe -m timeit -s 'from fractions import Fraction' 'Fraction(3)`
31.7 usec/loop -> 9.2 usec/loop

  ./python.exe -m timeit -s 'from fractions import Fraction' 'Fraction(3, 2)'`
27.7 usec/loop -> 9.32 usec/loop

  ./python.exe -m timeit -s 'from fractions import Fraction; f = Fraction(3, 2)' 'Fraction(f)'
31.9 usec/loop -> 14.3 usec/loop

17 years agoFix decimal repr which should have used single quotes like other reprs.
Raymond Hettinger [Thu, 14 Feb 2008 02:41:22 +0000 (02:41 +0000)]
Fix decimal repr which should have used single quotes like other reprs.

17 years agoUpdate notes on Decimal.
Raymond Hettinger [Thu, 14 Feb 2008 01:08:02 +0000 (01:08 +0000)]
Update notes on Decimal.

17 years agoBring NEWS.txt up to date from check-in msgs.
Kurt B. Kaiser [Thu, 14 Feb 2008 00:08:55 +0000 (00:08 +0000)]
Bring NEWS.txt up to date from check-in msgs.

17 years agoMake the test somewhat clearer (I hope).
Thomas Heller [Wed, 13 Feb 2008 20:36:51 +0000 (20:36 +0000)]
Make the test somewhat clearer (I hope).

17 years agoAdd pickle support to ctypes types.
Thomas Heller [Wed, 13 Feb 2008 20:21:53 +0000 (20:21 +0000)]
Add pickle support to ctypes types.

17 years agoFix --enable-universalsdk and its comment line so that zsh's flag completion
Brett Cannon [Wed, 13 Feb 2008 19:15:44 +0000 (19:15 +0000)]
Fix --enable-universalsdk and its comment line so that zsh's flag completion
works.

Thanks to Jeroen Ruigrok van der Werven for the fix.

17 years agoWorking on issue #1762: Brought
Jeffrey Yasskin [Wed, 13 Feb 2008 17:58:04 +0000 (17:58 +0000)]
Working on issue #1762: Brought
  ./python.exe -m timeit -s 'from fractions import Fraction; f = Fraction(3, 2)' 'isinstance(3, Fraction); isinstance(f, Fraction)'
from 12.3 usec/loop to 3.44 usec/loop and
  ./python.exe -m timeit -s 'from fractions import Fraction' 'Fraction(3, 2)'
from 48.8 usec to 23.6 usec by avoiding genexps and sets in __instancecheck__
and inlining the common case from __subclasscheck__.

17 years ago#2063: correct order of utime and stime in os.times()
Georg Brandl [Wed, 13 Feb 2008 07:20:22 +0000 (07:20 +0000)]
#2063: correct order of utime and stime in os.times()
result on Windows.

17 years agoReplace R=fractions.Fraction with F=fractions.Fraction in
Mark Dickinson [Tue, 12 Feb 2008 21:46:54 +0000 (21:46 +0000)]
Replace R=fractions.Fraction with F=fractions.Fraction in
test_fractions.py.  This should have been part of the name
change from Rational to Fraction.

17 years agoRevert change in r60712: turn alternate constructors back into
Mark Dickinson [Tue, 12 Feb 2008 21:40:53 +0000 (21:40 +0000)]
Revert change in r60712:  turn alternate constructors back into
classmethods instead of staticmethods.

17 years agoImplementation of Fraction.limit_denominator.
Mark Dickinson [Tue, 12 Feb 2008 21:31:59 +0000 (21:31 +0000)]
Implementation of Fraction.limit_denominator.

Remove Fraction.to_continued_fraction and
Fraction.from_continued_fraction

17 years agodict.copy() rises from the ashes. Revert r60687.
Raymond Hettinger [Tue, 12 Feb 2008 19:05:36 +0000 (19:05 +0000)]
dict.copy() rises from the ashes.  Revert r60687.

17 years agoPatch #1966: Break infinite loop in httplib when the servers
Martin v. Löwis [Tue, 12 Feb 2008 18:47:34 +0000 (18:47 +0000)]
Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
Will backport to 2.5.

17 years agowhat??! Correct r60225.
Kurt B. Kaiser [Tue, 12 Feb 2008 15:45:50 +0000 (15:45 +0000)]
what??! Correct r60225.

17 years agoPatch #1736: Fix file name handling of _msi.FCICreate.
Martin v. Löwis [Tue, 12 Feb 2008 13:47:26 +0000 (13:47 +0000)]
Patch #1736: Fix file name handling of _msi.FCICreate.

17 years agoBring decimal a bit closer to the spec for Reals.
Raymond Hettinger [Tue, 12 Feb 2008 01:18:03 +0000 (01:18 +0000)]
Bring decimal a bit closer to the spec for Reals.

17 years agoFix typo in comments
Raymond Hettinger [Tue, 12 Feb 2008 00:48:20 +0000 (00:48 +0000)]
Fix typo in comments

17 years agoRestore fractions.rst to the document tree.
Raymond Hettinger [Tue, 12 Feb 2008 00:15:32 +0000 (00:15 +0000)]
Restore fractions.rst to the document tree.

17 years agoBackport ABC docs
Raymond Hettinger [Mon, 11 Feb 2008 23:38:00 +0000 (23:38 +0000)]
Backport ABC docs

17 years agoFix markup
Raymond Hettinger [Mon, 11 Feb 2008 23:34:56 +0000 (23:34 +0000)]
Fix markup

17 years agoAdd notes on how decimal fits into the model.
Raymond Hettinger [Mon, 11 Feb 2008 22:53:01 +0000 (22:53 +0000)]
Add notes on how decimal fits into the model.

17 years agoAdd tests for pickletools.optimize().
Raymond Hettinger [Mon, 11 Feb 2008 20:05:53 +0000 (20:05 +0000)]
Add tests for pickletools.optimize().

17 years agoMake sure that xstar headers are read correctly.
Lars Gustäbel [Mon, 11 Feb 2008 19:17:10 +0000 (19:17 +0000)]
Make sure that xstar headers are read correctly.

17 years agoNo need to register classes that already inherit from ABCs.
Raymond Hettinger [Mon, 11 Feb 2008 18:51:08 +0000 (18:51 +0000)]
No need to register classes that already inherit from ABCs.

17 years agoPut an extra space into the repr of a Fraction:
Mark Dickinson [Mon, 11 Feb 2008 03:11:55 +0000 (03:11 +0000)]
Put an extra space into the repr of a Fraction:
Fraction(1, 2) instead of Fraction(1,2).

17 years agoThe test requires the network resource
Christian Heimes [Mon, 11 Feb 2008 02:26:22 +0000 (02:26 +0000)]
The test requires the network resource

17 years agoRename rational.Rational to fractions.Fraction, to avoid name clash
Mark Dickinson [Sun, 10 Feb 2008 21:29:51 +0000 (21:29 +0000)]
Rename rational.Rational to fractions.Fraction, to avoid name clash
with numbers.Rational.  See issue #1682 for related discussion.

17 years agoComplete an open todo on pickletools -- add a pickle optimizer.
Raymond Hettinger [Sun, 10 Feb 2008 20:35:16 +0000 (20:35 +0000)]
Complete an open todo on pickletools -- add a pickle optimizer.

17 years agoRemove reference to Rational
Mark Dickinson [Sun, 10 Feb 2008 19:23:36 +0000 (19:23 +0000)]
Remove reference to Rational

17 years agowhoops - revert
Skip Montanaro [Sun, 10 Feb 2008 15:32:16 +0000 (15:32 +0000)]
whoops - revert

17 years agoGet the saying right. ;-)
Skip Montanaro [Sun, 10 Feb 2008 15:31:54 +0000 (15:31 +0000)]
Get the saying right. ;-)

17 years agoTypos in decimal comment and documentation
Mark Dickinson [Sun, 10 Feb 2008 15:19:58 +0000 (15:19 +0000)]
Typos in decimal comment and documentation

17 years agoForgot to modify header file in r60707.
Eric Smith [Sun, 10 Feb 2008 15:07:44 +0000 (15:07 +0000)]
Forgot to modify header file in r60707.

17 years agoTurn classmethods into staticmethods, and avoid calling the constructor
Mark Dickinson [Sun, 10 Feb 2008 14:58:38 +0000 (14:58 +0000)]
Turn classmethods into staticmethods, and avoid calling the constructor
of subclasses of Rational.  (See discussion in issue #1682.)

17 years agoAdd missing NEWS entry for r60695
Nick Coghlan [Sun, 10 Feb 2008 07:32:52 +0000 (07:32 +0000)]
Add missing NEWS entry for r60695

17 years agoClarify that decimal also supports fixed-point arithmetic.
Raymond Hettinger [Sun, 10 Feb 2008 07:21:09 +0000 (07:21 +0000)]
Clarify that decimal also supports fixed-point arithmetic.

17 years agoAdded PyNumber_ToBase and supporting routines _PyInt_Format and
Eric Smith [Sun, 10 Feb 2008 01:36:53 +0000 (01:36 +0000)]
Added PyNumber_ToBase and supporting routines _PyInt_Format and
_PyLong_Format.  In longobject.c, changed long_format to
_PyLong_Format.  In intobject.c, changed uses of PyOS_snprintf to
_PyInt_Format instead.

_PyLong_Format is similar to py3k's routine of the same name, except
it has 2 additional parameters: addL and newstyle.  addL was existing
in long_format, and controls adding the trailing "L".  This is
unneeded in py3k.  newstyle is used to control whether octal prepends
"0" (the pre-2.6 style), or "0o" (the 3.0 sytle).

PyNumber_ToBase is needed for PEP 3127 (Integer Literal Support and
Syntax) and PEP 3101 (Advanced String Formatting).

This changeset does not need merging into py3k.

17 years agoFix for newest doctools.
Georg Brandl [Sat, 9 Feb 2008 23:09:25 +0000 (23:09 +0000)]
Fix for newest doctools.

17 years agoFix link.
Georg Brandl [Sat, 9 Feb 2008 22:00:00 +0000 (22:00 +0000)]
Fix link.

17 years agoDocs are rst now.
Georg Brandl [Sat, 9 Feb 2008 21:38:54 +0000 (21:38 +0000)]
Docs are rst now.

17 years agoNeeds only 2.4 now.
Georg Brandl [Sat, 9 Feb 2008 21:36:15 +0000 (21:36 +0000)]
Needs only 2.4 now.

17 years agoIssue #1706: Require Windows 2000+
Christian Heimes [Sat, 9 Feb 2008 19:55:22 +0000 (19:55 +0000)]
Issue #1706: Require Windows 2000+
Added Py_BUILD_CORE_MODULES macro to set WINVER and NTDDI_VERSION to Windows 2000 for core modules, too
Added -d option to build.bat (same as -c Debug) and fixed warning about /build option
Updated Windows related readme.txt files

17 years agoIssue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context...
Nick Coghlan [Sat, 9 Feb 2008 15:28:09 +0000 (15:28 +0000)]
Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5)

17 years agoTemporarily disable this test. It's been broken for a week.
Raymond Hettinger [Sat, 9 Feb 2008 10:06:20 +0000 (10:06 +0000)]
Temporarily disable this test. It's been broken for a week.

17 years agoMetaclass declaration is inherited
Raymond Hettinger [Sat, 9 Feb 2008 10:04:19 +0000 (10:04 +0000)]
Metaclass declaration is inherited

17 years agoAdd -3 warnings that set.copy(), dict.copy(), and defaultdict.copy() will go away...
Raymond Hettinger [Sat, 9 Feb 2008 04:37:49 +0000 (04:37 +0000)]
Add -3 warnings that set.copy(), dict.copy(), and defaultdict.copy() will go away in Py3.x

17 years agoMerge with r60683.
Raymond Hettinger [Sat, 9 Feb 2008 03:34:52 +0000 (03:34 +0000)]
Merge with r60683.

17 years agoMake ABC containers inherit as documented.
Raymond Hettinger [Sat, 9 Feb 2008 01:18:42 +0000 (01:18 +0000)]
Make ABC containers inherit as documented.

17 years agoAdd advice on choosing between DictMixin and MutableMapping
Raymond Hettinger [Fri, 8 Feb 2008 23:57:06 +0000 (23:57 +0000)]
Add advice on choosing between DictMixin and MutableMapping

17 years agoFill-in missing Set comparisons
Raymond Hettinger [Fri, 8 Feb 2008 23:34:21 +0000 (23:34 +0000)]
Fill-in missing Set comparisons

17 years agoSpeed-up __iter__() mixin method.
Raymond Hettinger [Fri, 8 Feb 2008 23:02:27 +0000 (23:02 +0000)]
Speed-up __iter__() mixin method.

17 years agoRemove unnecessary modulo division.
Raymond Hettinger [Fri, 8 Feb 2008 22:30:04 +0000 (22:30 +0000)]
Remove unnecessary modulo division.
The preceding test guarantees that 0 <= i < len.

17 years agoUpdate big5hkscs codec to conform to the HKSCS:2004 revision.
Hye-Shik Chang [Fri, 8 Feb 2008 17:10:20 +0000 (17:10 +0000)]
Update big5hkscs codec to conform to the HKSCS:2004 revision.

17 years agoOops! 2.6's Rational.__ne__ didn't work.
Jeffrey Yasskin [Fri, 8 Feb 2008 06:45:40 +0000 (06:45 +0000)]
Oops! 2.6's Rational.__ne__ didn't work.

17 years agoissue 2045: Infinite recursion when printing a subclass of defaultdict,
Amaury Forgeot d'Arc [Fri, 8 Feb 2008 00:56:02 +0000 (00:56 +0000)]
issue 2045: Infinite recursion when printing a subclass of defaultdict,
if default_factory is set to a bound method.

Will backport.

17 years agoUse prefix decrement
Christian Heimes [Fri, 8 Feb 2008 00:14:34 +0000 (00:14 +0000)]
Use prefix decrement

17 years agoDeallocate content of the dict free list on interpreter shutdown
Christian Heimes [Fri, 8 Feb 2008 00:11:31 +0000 (00:11 +0000)]
Deallocate content of the dict free list on interpreter shutdown

17 years agoMake sure a switch statement does not have repetitive case statements.
Brett Cannon [Thu, 7 Feb 2008 22:27:10 +0000 (22:27 +0000)]
Make sure a switch statement does not have repetitive case statements.
Error found through LLVM post-2.1 svn.

17 years agoFix typo
Raymond Hettinger [Thu, 7 Feb 2008 20:10:49 +0000 (20:10 +0000)]
Fix typo

17 years agoThe float conversion recipe is simpler in Py2.6
Raymond Hettinger [Thu, 7 Feb 2008 20:04:37 +0000 (20:04 +0000)]
The float conversion recipe is simpler in Py2.6

17 years agoFix typo in docstring for Calendar.itermonthdays().
Walter Dörwald [Thu, 7 Feb 2008 19:57:32 +0000 (19:57 +0000)]
Fix typo in docstring for Calendar.itermonthdays().

17 years agoFix documentation for Calendar.iterweekdays(): firstweekday is a property.
Walter Dörwald [Thu, 7 Feb 2008 19:48:34 +0000 (19:48 +0000)]
Fix documentation for Calendar.iterweekdays(): firstweekday is a property.
Fixes second part of #2018.

17 years agoClarify that the output of TextCalendar.formatmonth() and
Walter Dörwald [Thu, 7 Feb 2008 19:30:22 +0000 (19:30 +0000)]
Clarify that the output of TextCalendar.formatmonth() and
TextCalendar.formatyear() for custom instances won't be influenced by calls
to the module global setfirstweekday() function. Fixes #2018.

17 years agoFixes Issue 1401. When redirected, a possible POST get converted
Facundo Batista [Thu, 7 Feb 2008 19:06:52 +0000 (19:06 +0000)]
Fixes Issue 1401. When redirected, a possible POST get converted
to GET, so it loses its payload. So, it also must lose the
headers related to the payload (if it has no content any more,
it shouldn't indicate content length and type).

17 years agoAdded some statistics code to dict and list object code. I wanted to test how a large...
Christian Heimes [Thu, 7 Feb 2008 17:15:30 +0000 (17:15 +0000)]
Added some statistics code to dict and list object code. I wanted to test how a larger freelist affects the reusage of freed objects. Contrary to my gut feelings 80 objects is more than fine for small apps. I haven't profiled a large app yet.

17 years agoFixes issue 2026. Tests converted to unittest. Thanks
Facundo Batista [Thu, 7 Feb 2008 16:16:29 +0000 (16:16 +0000)]
Fixes issue 2026.  Tests converted to unittest.  Thanks
Giampaolo Rodola.

17 years agoUpdate URL
Andrew M. Kuchling [Thu, 7 Feb 2008 11:43:47 +0000 (11:43 +0000)]
Update URL

17 years agoRemove unnecessary curly braces around an int literal.
Brett Cannon [Thu, 7 Feb 2008 08:04:07 +0000 (08:04 +0000)]
Remove unnecessary curly braces around an int literal.

17 years agoCast a struct to a void pointer so as to do a type-safe pointer comparison
Brett Cannon [Thu, 7 Feb 2008 07:47:31 +0000 (07:47 +0000)]
Cast a struct to a void pointer so as to do a type-safe pointer comparison
(mistmatch found by clang).

17 years agoMerge r60628, r60631, and r60633. Register UserList and UserString will the appropri...
Raymond Hettinger [Thu, 7 Feb 2008 03:25:46 +0000 (03:25 +0000)]
Merge r60628, r60631, and r60633.  Register UserList and UserString will the appropriate ABCs.

17 years agoMerge 60627.
Raymond Hettinger [Thu, 7 Feb 2008 03:10:33 +0000 (03:10 +0000)]
Merge 60627.

17 years agoReturn ints instead of longs for tuple.count() and tuple.index().
Raymond Hettinger [Thu, 7 Feb 2008 02:12:52 +0000 (02:12 +0000)]
Return ints instead of longs for tuple.count() and tuple.index().

17 years agoIEEE 754 should be IEEE 854; give precise reference for
Mark Dickinson [Thu, 7 Feb 2008 01:42:06 +0000 (01:42 +0000)]
IEEE 754 should be IEEE 854;  give precise reference for
comparisons involving NaNs.

17 years agoFix broken link in decimal documentation.
Mark Dickinson [Thu, 7 Feb 2008 01:14:23 +0000 (01:14 +0000)]
Fix broken link in decimal documentation.

17 years agoIssue 2025: Add tuple.count() and tuple.index() to follow the ABC in collections...
Raymond Hettinger [Thu, 7 Feb 2008 00:54:20 +0000 (00:54 +0000)]
Issue 2025:  Add tuple.count() and tuple.index() to follow the ABC in collections.Sequence.

17 years agoRevert accidental changes to test_queue in r60605.
Georg Brandl [Wed, 6 Feb 2008 23:45:51 +0000 (23:45 +0000)]
Revert accidental changes to test_queue in r60605.

17 years agoRemove incorrect usage of :const: in documentation.
Mark Dickinson [Wed, 6 Feb 2008 22:25:16 +0000 (22:25 +0000)]
Remove incorrect usage of :const: in documentation.

17 years agoIssue 1979: Make Decimal comparisons (other than !=, ==) involving NaN
Mark Dickinson [Wed, 6 Feb 2008 22:10:50 +0000 (22:10 +0000)]
Issue 1979: Make Decimal comparisons (other than !=, ==) involving NaN
raise InvalidOperation (and return False if InvalidOperation is trapped).

17 years agoFixed refcounts and error handling.
Thomas Heller [Wed, 6 Feb 2008 20:29:17 +0000 (20:29 +0000)]
Fixed refcounts and error handling.

Should not be merged to py3k branch.

17 years agoFixes issue 1959. Converted tests to unittest.
Facundo Batista [Wed, 6 Feb 2008 19:28:49 +0000 (19:28 +0000)]
Fixes issue 1959. Converted tests to unittest.
Thanks Giampaolo Rodola.

17 years agoRemove month parameter from Calendar.yeardatescalendar(),
Walter Dörwald [Wed, 6 Feb 2008 14:31:55 +0000 (14:31 +0000)]
Remove month parameter from Calendar.yeardatescalendar(),
Calendar.yeardays2calendar() and Calendar.yeardayscalendar() as the methods
don't have such a parameter. Fixes issue #2017.

Rewrap content to 80 chars.

17 years agoUnified naming convention for free lists and their limits. All free lists
Christian Heimes [Wed, 6 Feb 2008 13:33:44 +0000 (13:33 +0000)]
Unified naming convention for free lists and their limits. All free lists
in Object/ are named ``free_list``, the counter ``numfree`` and the upper
limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.

The chances should make it easier to adjust Python for platforms with
less memory, e.g. mobile phones.

17 years agoLimit free list of method and builtin function objects to 256 entries each.
Christian Heimes [Wed, 6 Feb 2008 12:44:34 +0000 (12:44 +0000)]
Limit free list of method and builtin function objects to 256 entries each.

17 years agoSync-up with Py3k work.
Raymond Hettinger [Wed, 6 Feb 2008 01:49:00 +0000 (01:49 +0000)]
Sync-up with Py3k work.

17 years ago* Use the same code to profile for test_profile and test_cprofile.
Georg Brandl [Tue, 5 Feb 2008 19:58:17 +0000 (19:58 +0000)]
* Use the same code to profile for test_profile and test_cprofile.
* Convert both to unittest.
* Use the same unit testing code.
* Include the expected output in both test files.
* Make it possible to regenerate the expected output by running
  the file as a script with an '-r' argument.

17 years agocorrect object name
Skip Montanaro [Tue, 5 Feb 2008 19:24:30 +0000 (19:24 +0000)]
correct object name

17 years agoActually run the test.
Georg Brandl [Tue, 5 Feb 2008 19:07:10 +0000 (19:07 +0000)]
Actually run the test.

17 years agoIssue 1951. Converts wave test cases to unittest.
Facundo Batista [Tue, 5 Feb 2008 19:03:32 +0000 (19:03 +0000)]
Issue 1951. Converts wave test cases to unittest.

17 years agoFix unittest conversion breakage.
Georg Brandl [Tue, 5 Feb 2008 18:32:47 +0000 (18:32 +0000)]
Fix unittest conversion breakage.

17 years agoIn the experimental 'Scanner' feature, the group count was set wrong.
Guido van Rossum [Tue, 5 Feb 2008 17:32:15 +0000 (17:32 +0000)]
In the experimental 'Scanner' feature, the group count was set wrong.

17 years agoUpdate PEP URL.
Andrew M. Kuchling [Tue, 5 Feb 2008 16:06:57 +0000 (16:06 +0000)]
Update PEP URL.
(This code is duplicated between pydoc and DocXMLRPCServer; maybe it
should be refactored as a GHOP project.)

2.5.2 backport candidate.

17 years agoKeep distutils Python 2.1 compatible (or even Python 2.4 in this case).
Marc-André Lemburg [Tue, 5 Feb 2008 14:50:40 +0000 (14:50 +0000)]
Keep distutils Python 2.1 compatible (or even Python 2.4 in this case).

17 years agoConvert external links to internal links. Fixes #2010.
Georg Brandl [Tue, 5 Feb 2008 12:01:24 +0000 (12:01 +0000)]
Convert external links to internal links. Fixes #2010.

17 years agoIssue #2004: Use mode 0700 for temporary directories and default
Lars Gustäbel [Tue, 5 Feb 2008 11:51:40 +0000 (11:51 +0000)]
Issue #2004: Use mode 0700 for temporary directories and default
permissions for missing directories.

(will backport to 2.5)

17 years agosync with most recent version from python-mode sf project
Skip Montanaro [Tue, 5 Feb 2008 02:32:16 +0000 (02:32 +0000)]
sync with most recent version from python-mode sf project

17 years agoChange r60575 broke test_compile:
Amaury Forgeot d'Arc [Tue, 5 Feb 2008 00:26:21 +0000 (00:26 +0000)]
Change r60575 broke test_compile:
there is no need to emit co_lnotab item when both offsets are zeros.

17 years ago#1750076: Debugger did not step on every iteration of a while statement.
Amaury Forgeot d'Arc [Mon, 4 Feb 2008 21:45:05 +0000 (21:45 +0000)]
#1750076: Debugger did not step on every iteration of a while statement.

The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.

Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.

The lnotab seems to be exactly the same as with python2.4.

17 years agoCorrect quotes in NEWS file
Amaury Forgeot d'Arc [Mon, 4 Feb 2008 20:53:14 +0000 (20:53 +0000)]
Correct quotes in NEWS file