Commit Graph

19911 Commits

Author SHA1 Message Date
Fredrik Lundh
1538c23dec restored 1.5.2 compatibility
added local escape method (made the dumps method some 50-80% faster)
minor tweaks to the unmarshalling code
2001-10-01 19:42:03 +00:00
Tim Peters
1ce3cf7749 SF patch [#466877] SIGBREAK is missing from signal module.
Patch from Steve Scott to add SIGBREAK support (unique to Windows).
2001-10-01 17:58:40 +00:00
Skip Montanaro
fbacaf7298 approximately double dump performance by moving import of cgi.escape back to
top level.
2001-10-01 17:50:29 +00:00
Skip Montanaro
419abdaff2 simple dumps/loads test case for xmlrpclib 2001-10-01 17:47:44 +00:00
Guido van Rossum
55f2099b2f Miscellaneous code fiddling:
- SLOT1BINFULL() macro: changed this to check for __rop__ overriding
  __op__, like binary_op1() in abstract.c -- the latter only calls the
  slot function once if both types use the same slot function, so the
  slot function must make both calls -- which it already did for the
  __op__, __rop__ order, but not yet for the __rop__, __op__ order
  when B.__class__ is a subclass of A.__class__.

- slot_sq_contains(), slot_nb_nonzero(): use lookup_maybe() rather
  than lookup_method() which sets an exception which we then clear.

- slot_nb_coerce(): don't give up when left argument's __coerce__
returns NotImplemented, but give the right argument a chance.
2001-10-01 17:18:22 +00:00
Guido van Rossum
89c4264792 binary_op1(), ternary_op(): rearrange the code so that slotw is tested
(to see whether __rop__ should go before __op__) only when slotv is
set.  This saves a test+branch when only slotw is set.
2001-10-01 17:10:18 +00:00
Fred Drake
6c81e2a44f "boolean" --> "Boolean" (per the style guide). 2001-10-01 17:04:10 +00:00
Fred Drake
0f0380a25f Fix some minor style-guide conformance bugs. 2001-10-01 17:04:10 +00:00
Martin v. Löwis
5868fb8df1 Undo last checkin. 2001-10-01 17:04:03 +00:00
Fred Drake
fe95e65668 Straighten out some markup.
"boolean" --> "Boolean" (per the style guide).
2001-10-01 17:03:48 +00:00
Martin v. Löwis
c04f7a794e Undo last checkin, since it duplicated the code. 2001-10-01 17:02:49 +00:00
Guido van Rossum
2611162345 slot_sq_length(): squash a leak. 2001-10-01 16:42:49 +00:00
Fred Drake
73921b0eec Refer to the objects which define __len__(), __*item__(), and __iter__()
as container objects rather than as mapping objects (in the index entries).
Change the section heading and intro sentence to be a little more general,
since that's how things have actually evolved.
2001-10-01 16:32:13 +00:00
Guido van Rossum
25d1807d23 slot_tp_new(): newargs was leaking. 2001-10-01 15:55:28 +00:00
Fred Drake
e9ba525c2b Clarify comments about mailbox objects being iterable. 2001-10-01 15:49:56 +00:00
Guido van Rossum
e7877df595 Docs for SF patch #462628 2001-10-01 13:50:15 +00:00
Guido van Rossum
ff68693dd5 Another SF patch contributor. 2001-10-01 13:47:46 +00:00
Guido van Rossum
d1d584f4e8 SF patch #462628 (Travers Naran) NNTPLib supports saving BODY to a file.
I modified nntplib so the body method can accept an
  optional second parameter pointing to a filehandle or
  filename (string). This way, really long body
  articles can be stored to disk instead of kept in
  memory. The way I made the modification should make
  it easy to extend this functionality to other extended
  return methods.
2001-10-01 13:46:55 +00:00
Guido van Rossum
d016e45fdb Fix typo found by doerwalter. 2001-10-01 13:17:24 +00:00
Martin v. Löwis
2fa69d7984 Patch #426880: Implement Listbox itemcget and itemconfigure. 2001-10-01 10:09:31 +00:00
Martin v. Löwis
0daad598d0 Patch #462122: add readline startup and pre_event hooks. 2001-09-30 21:09:59 +00:00
Martin v. Löwis
16dc7f44b1 Patch #462190, patch #464070: Support quoted printable in the binascii module.
Decode and encode underscores for header style encoding. Fixes bug #463996.
2001-09-30 20:32:11 +00:00
Martin v. Löwis
5f12d755a8 Properly detect recursive structures. Adopted from patch #465298. 2001-09-30 20:15:41 +00:00
Tim Peters
af5910f025 The execfile() docs imply it acts on locals same as exec. But in truth
it acts more like assigning to keys in locals(), i.e. modifications to
function locals aren't reflected in the locals when execfile() returns.
2001-09-30 06:32:59 +00:00
Tim Peters
1c33daf143 Correct docs for long(float). 2001-09-30 06:18:26 +00:00
Tim Peters
8b13b3ede2 SF bug [#466173] unpack TypeError unclear
Replaced 3 instances of "iter() of non-sequence" with
"iteration over non-sequence".
Restored "unpack non-sequence" for stuff like "a, b = 1".
2001-09-30 05:58:42 +00:00
Tim Peters
d38b1c74f3 SF [#466125] PyLong_AsLongLong works for any integer.
Generalize PyLong_AsLongLong to accept int arguments too.  The real point
is so that PyArg_ParseTuple's 'L' code does too.  That code was
undocumented (AFAICT), so documented it.
2001-09-30 05:09:37 +00:00
Fred Drake
ac1af8093e Handle PEP references the same way RFC references. 2001-09-29 19:07:22 +00:00
Guido van Rossum
0d68246f01 Fix two typos in the text about compile(), and add two caveats from
recent user feedback: you must end the input with \n and you must use
\n, not \r\n to represent line endings.
2001-09-29 14:28:52 +00:00
Skip Montanaro
a1c3662e84 forgot to mark use of StringType and UnicodeType in the text. 2001-09-29 13:53:21 +00:00
Skip Montanaro
c7ba0c4c24 added description of StringTypes object 2001-09-29 13:49:41 +00:00
Fred Drake
583061a10f Fix up whitespace in <args> elements; reduce sequences of consecutive
whitespace characters to a single space.
Small changes elsewhere, mostly to clean up the code a little.
2001-09-29 05:05:25 +00:00
Fred Drake
2b05ca3454 Minor markup improvement. 2001-09-29 05:01:59 +00:00
Fred Drake
d157237d51 For Python 2.2, do not use __getattr__(), only use computed properties.
This is probably a little bit faster, but mostly is just cleaner code.
The old-style support is still used for Python versions < 2.2 so this
source file can be shared with PyXML.
2001-09-29 04:58:32 +00:00
Fred Drake
787fd8cdeb _dispatch(): Do no re-define the resolve_dotted_atttribute() function
every time this gets called; move it out as a global helper function.
    Simplify the call to the _dispatch() method of the registered instance.
2001-09-29 04:54:33 +00:00
Tim Peters
599db7de63 The list.sort() docs require a function that returns -1, 0 or +1. That's
never been true, and in particular implies cmp() can't be used(!).  Get
closer to the truth.
2001-09-29 01:08:19 +00:00
Guido van Rossum
84675acb49 The changes to ternary_op could cause a core dump. Fix this, and
rewrite the code a bit to avoid calling the same slot more than once.
2001-09-29 01:05:03 +00:00
Guido van Rossum
bb29b9c952 Clarify the warning about the relative dates of Setup.dist and Setup;
Jeremy had seen the warning but not realized what he should do about
it.  Add the hint "Usually, copying Setup.dist to Setup will work."
2001-09-29 00:42:19 +00:00
Guido van Rossum
751c4c864c Add a few ``__dynamic__ = 0'' lines in classes that need to preserve
staticness when __dynamic__ = 1 becomes the default:

- Some classes which are used to test the difference between static
  and dynamic.

- Subclasses of complex: complex uses old-style numbers and the slot
  wrappers used by dynamic classes only support new-style numbers.
  (Ideally, the complex type should be fixed, but that looks like a
  labor-intensive job.)
2001-09-29 00:40:25 +00:00
Guido van Rossum
4bb1e36eec It's a fact: for binary operators, *under certain circumstances*,
__rop__ now takes precendence over __op__.  Those circumstances are:

  - Both arguments are new-style classes
  - Both arguments are new-style numbers
  - Their implementation slots for tp_op differ
  - Their types differ
  - The right argument's type is a subtype of the left argument's type

Also did this for the ternary operator (pow) -- only the binary case
is dealt with properly though, since __rpow__ is not supported anyway.
2001-09-28 23:49:48 +00:00
Guido van Rossum
9bea3abf0d Ouch. The wrapper for __rpow__ was the same as for __pow__, resulting
in bizarre outcomes.  Test forthcoming.
2001-09-28 22:58:52 +00:00
Fred Drake
7988e0249c Move XML-RPC-related docs to the "Internet Protocols" chapter.
Add entry for the SimpleXMLRPCServer module.
2001-09-28 22:03:40 +00:00
Fred Drake
06c61b14fe Add entry for the SimpleXMLRPCServer module. 2001-09-28 22:02:49 +00:00
Fred Drake
e486e0d066 Preliminary documentation for the SimpleXMLRPCServer module. 2001-09-28 22:02:21 +00:00
Tim Peters
abf925f6bf Post-release fiddling (prep for 2.2b1). 2001-09-28 21:53:42 +00:00
Andrew M. Kuchling
d4707e3b62 Minor additions and rewrites.
Bump version number.
2001-09-28 20:46:46 +00:00
Fred Drake
946f7b1b24 Update the xml.dom.minidom tests to cover the DOM-compliant parts of the
NodeList interface.
2001-09-28 20:31:50 +00:00
Andrew M. Kuchling
76d62b4e79 Install the new compiler and email packages 2001-09-28 20:29:15 +00:00
Fred Drake
575712eaca Tighten up the new NodeList implementation.
Clean up a little; do not create an alias that is only used once, or store
attributes with constant values in an instance.
2001-09-28 20:25:45 +00:00
Fred Drake
88a56857f6 Remove an infelicitous space. 2001-09-28 20:16:30 +00:00