Neal Norwitz
b93e7d16d5
Add a little info to the 3k deprecation warnings about what to use instead.
...
Suggested by Raymond Hettinger.
2008-02-24 02:40:58 +00:00
Neal Norwitz
53152a1905
map(None, ...) is not supported in 3.0.
2008-02-24 02:20:25 +00:00
Christian Heimes
5e8e6d2454
MS Windows doesn't have mode_t but stat.st_mode is defined as unsigned short.
2008-02-23 23:59:45 +00:00
Christian Heimes
4034685a58
Issue #2051 and patch from Alexander Belopolsky:
...
Permission for pyc and pyo files are inherited from the py file.
2008-02-23 17:52:07 +00:00
Eric Smith
8328bbc57d
Removed duplicate Py_CHARMASK define. It's already defined in Python.h.
2008-02-23 16:05:26 +00:00
Christian Heimes
5224d28d38
Patch #1759 : Backport of PEP 3129 class decorators
...
with some help from Georg
2008-02-23 15:01:05 +00:00
Eric Smith
3cd8194b9c
Added bin() builtin. I'm going to check in the tests in a seperate checkin, because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.
2008-02-22 16:30:22 +00:00
Eric Smith
7ef40bf9c7
Trim leading zeros from a floating point exponent, per C99. See issue 1600. As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
2008-02-20 23:34:22 +00:00
Kristján Valur Jónsson
5299935be5
Perform correct handling of stack overflow for windows: Catch the correct exception code and reset the overflow condition when handled.
2008-02-18 17:40:47 +00:00
Eric Smith
a9f7d62480
Backport of PEP 3101, Advanced String Formatting, from py3k.
...
Highlights:
- Adding PyObject_Format.
- Adding string.Format class.
- Adding __format__ for str, unicode, int, long, float, datetime.
- Adding builtin format.
- Adding ''.format and u''.format.
- str/unicode fixups for formatters.
The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
unicodedefs.h, formatter.h, string_format.h) are identical in trunk
and py3k. Any changes from here on should be made to trunk, and
changes will propogate to py3k).
2008-02-17 19:46:49 +00:00
Christian Heimes
f75dbef208
Deallocate content of the dict free list on interpreter shutdown
2008-02-08 00:11:31 +00:00
Brett Cannon
687af0d8fb
Remove unnecessary curly braces around an int literal.
2008-02-07 08:04:07 +00:00
Brett Cannon
a6c41bc9e5
Cast a struct to a void pointer so as to do a type-safe pointer comparison
...
(mistmatch found by clang).
2008-02-07 07:47:31 +00:00
Amaury Forgeot d'Arc
99af7dbc07
Change r60575 broke test_compile:
...
there is no need to emit co_lnotab item when both offsets are zeros.
2008-02-05 00:26:21 +00:00
Amaury Forgeot d'Arc
6fd03bb607
#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.
2008-02-04 21:45:05 +00:00
Christian Heimes
422051a367
Patch #1953
...
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
2008-02-04 18:00:12 +00:00
Neal Norwitz
fb43d1e4aa
Fix refleak
2008-02-01 07:22:59 +00:00
Jeffrey Yasskin
ca2b69f765
Move __builtins__.trunc() to math.trunc() per
...
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
2008-02-01 06:22:46 +00:00
Mark Dickinson
105be7725b
Issue #1678380 . Fix a bug that identifies 0j and -0j when they appear
...
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.
2008-01-31 22:17:37 +00:00
Christian Heimes
796fc31585
The previous change was causing a segfault after multiple calls to Py_Initialize() and Py_Finalize().
2008-01-30 18:58:29 +00:00
Christian Heimes
0d9244332b
Fixed some references leaks in sys.
2008-01-30 17:21:22 +00:00
Christian Heimes
67ac0667f0
Removed unused var
2008-01-30 11:46:00 +00:00
Raymond Hettinger
867558afd6
CallMethod is faster with a NULL third-argument than with an empty format string.
2008-01-29 19:52:09 +00:00
Raymond Hettinger
bf3d1d5dc8
Removed unnecessary conditional (spotted by Neal Norwitz).
2008-01-28 21:51:25 +00:00
Raymond Hettinger
52716c94be
Let marshal built-up sets and frozensets one element at a time (without creating an intermediate tuple).
2008-01-28 21:34:30 +00:00