Raymond Hettinger
2412299be9
* Add clearer comment to initialization code.
...
* Add optional argument to popitem() -- modeled
after Anthon van der Neut's C version.
* Fix method markup in docs.
2009-03-19 19:59:58 +00:00
Raymond Hettinger
a0b8d9ad2d
Silence a compiler warning.
2009-03-19 19:24:43 +00:00
Raymond Hettinger
91852ca673
Issue 5381: Add object_pairs_hook to the json module.
2009-03-19 19:19:03 +00:00
Raymond Hettinger
2124599eaa
Improve implementation with better underlying data structure
...
for O(1) deletions. Big-Oh performance now the same as regular
dictionaries. Uses a doubly-linked list instead of a list/seq
to track insertion order.
2009-03-19 15:21:10 +00:00
Benjamin Peterson
fcfa7ead4f
close files after comparing them
2009-03-19 03:04:31 +00:00
Raymond Hettinger
a61ae6922f
Use mixin methods where possible. (2.7 only -- these don't all exist in 3.0)
2009-03-18 22:13:20 +00:00
Benjamin Peterson
06919a177d
a much better example
2009-03-18 20:58:09 +00:00
Benjamin Peterson
6ffe852f90
fix strange errors when setting attributes on tracebacks #4034
2009-03-18 20:52:15 +00:00
Antoine Pitrou
7c33bd5ecb
Attempt to fix Solaris buildbot failure on test_locale
2009-03-18 17:10:04 +00:00
Mark Dickinson
6b265f1bf8
Issue 4474: On platforms with sizeof(wchar_t) == 4 and
...
sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts
each character outside the BMP to the appropriate surrogate pair.
Thanks Victor Stinner for the patch.
(backport of r70452 from py3k to trunk)
2009-03-18 16:07:26 +00:00
Hirokazu Yamamoto
eb15863a97
Updated openssl support on VC6. (openssl-0.9.6g is old, cannot compile with _ssl.c)
...
If you use http://svn.python.org/projects/external/openssl-0.9.8g , Perl is not needed.
This scheme was ported from PCBuild.
2009-03-18 10:17:26 +00:00
Mark Dickinson
b14514a153
Fix bug in _insert_thousands_sep: too much zero padding could be
...
added for 'n' formats with non-repeating thousands-separator.
2009-03-18 08:22:51 +00:00
Bob Ippolito
d914e3f861
merge json library with simplejson 2.0.9 (issue 4136)
2009-03-17 23:19:00 +00:00
Mark Dickinson
277859d591
Issue #2110 : Add support for thousands separator and 'n' format specifier
...
to Decimal __format__ method.
2009-03-17 23:03:46 +00:00
Benjamin Peterson
ed3558b334
I thought this was begging for an example
2009-03-17 20:29:51 +00:00
Mark Dickinson
b065e52bc2
Fix bug in Decimal __format__ method that swapped left and right
...
alignment.
2009-03-17 18:01:03 +00:00
Georg Brandl
8cbe9556cf
Add token markup.
2009-03-16 19:42:03 +00:00
Hirokazu Yamamoto
bb7467f6e3
Added skip for old MSVC.
2009-03-15 22:43:14 +00:00
Georg Brandl
fc9ea97a18
Move the previously local import of threading to module level.
...
This is cleaner and avoids lockups in obscure cases where a Queue
is instantiated while the import lock is already held by another thread.
OKed by Tim Peters.
2009-03-15 22:11:07 +00:00
Georg Brandl
545a134916
Fix markup in re docs and give a mail address in regex howto, so that
...
the recommendation to send suggestions to the author can be followed.
2009-03-15 21:59:37 +00:00
Georg Brandl
173c1f1a01
#5469 : add with statement to list of name-binding constructs.
2009-03-15 21:53:56 +00:00
Georg Brandl
09827eb55e
#5276 : document IDLESTARTUP and .Idle.py.
2009-03-15 21:51:48 +00:00
Georg Brandl
8db96b5969
#5478 : fix copy-paste oversight in function signature.
2009-03-15 21:47:42 +00:00
Georg Brandl
44e5cd3e51
#5488 : add missing struct member.
2009-03-15 21:46:00 +00:00
Georg Brandl
5a95b21fee
#5491 : clarify nested() semantics.
2009-03-15 21:44:43 +00:00
Georg Brandl
ed4cefbedd
Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int.
2009-03-15 21:43:38 +00:00
Georg Brandl
3259ef3dff
#5493 : clarify __nonzero__ docs.
2009-03-15 21:37:16 +00:00
Georg Brandl
4c95e091d6
#5496 : fix docstring of lookup().
2009-03-15 21:32:06 +00:00
Benjamin Peterson
1706c644ae
fix tuple.index() error message #5495
2009-03-15 14:38:55 +00:00
Nick Coghlan
8eba5ed0d9
Make marshalling errors a little more informative as to what went wrong
2009-03-15 03:24:46 +00:00
Eric Smith
2ace4cf813
Unicode format tests weren't actually testing unicode. This was probably due to the original backport from py3k.
2009-03-14 14:37:38 +00:00
Eric Smith
6f42edb682
Issue 5237, Allow auto-numbered replacement fields in str.format() strings.
...
For simple uses for str.format(), this makes the typing easier. Hopfully this
will help in the adoption of str.format().
For example:
'The {} is {}'.format('sky', 'blue')
You can mix and matcth auto-numbering and named replacement fields:
'The {} is {color}'.format('sky', color='blue')
But you can't mix and match auto-numbering and specified numbering:
'The {0} is {}'.format('sky', 'blue')
ValueError: cannot switch from manual field specification to automatic field numbering
Will port to 3.1.
2009-03-14 11:57:26 +00:00
Antoine Pitrou
feeafff052
Issue #1222 : locale.format() bug when the thousands separator is a space character.
2009-03-14 00:07:21 +00:00
Georg Brandl
e83a4adba7
#5486 : typos.
2009-03-13 19:03:58 +00:00
Raymond Hettinger
efa7c138b6
Issue 5477: Fix buglet in the itertools documentation.
2009-03-12 00:31:58 +00:00
Raymond Hettinger
351de8017c
Add reference to solution for a commonly asked question.
2009-03-12 00:25:03 +00:00
Tarek Ziadé
61585c260c
Issue #5472 : Fixed distutils.test_util tear down
2009-03-11 12:48:04 +00:00
Brett Cannon
6c4cff0f32
Require implementations for warnings.showwarning() support the 'line' argument.
...
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652 .
2009-03-11 04:51:06 +00:00
Raymond Hettinger
8f19598f78
Fix typo.
2009-03-10 13:04:30 +00:00
Raymond Hettinger
56411aac79
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
2009-03-10 12:50:59 +00:00
Raymond Hettinger
bac769bb5e
Small optimization for corner case where maxlen==0.
2009-03-10 09:31:48 +00:00
Raymond Hettinger
ced6b1da83
Update the decimal FAQ for the from_float() classmethod and improve the recipe for remove_exponent() to make it cut and pasteable.
2009-03-10 08:16:05 +00:00
Raymond Hettinger
daeceb2de8
Add a version tag to the decimal module.
2009-03-10 04:49:21 +00:00
Raymond Hettinger
eecd1dc6e0
Clarify the meaning of normal and subnormal.
2009-03-10 04:40:24 +00:00
Raymond Hettinger
f345a21d8e
Update url for the spec.
2009-03-10 01:07:30 +00:00
Raymond Hettinger
f4ea929044
Fix markup.
2009-03-10 00:06:05 +00:00
Benjamin Peterson
6d83429a1d
gzip and bz2 are context managers
2009-03-09 20:38:56 +00:00
Georg Brandl
38f1bf6745
Add missing space.
2009-03-09 16:35:48 +00:00
Georg Brandl
2cd82a8383
#5458 : add a note when we started to raise RuntimeErrors.
2009-03-09 14:25:07 +00:00
Raymond Hettinger
9324ed8982
Add cross-reference to the collections docs.
2009-03-09 12:56:23 +00:00