Commit Graph

20949 Commits

Author SHA1 Message Date
Jack Jansen b6b6c6c33f Patch by Jason Harper to allow IDE to work again under MacOS 8.1. Plus appearance support for Wlist frames and focussing. Plus commented-out appearance support for the same for Wtext, which still needs some work. 2001-12-04 13:30:29 +00:00
Guido van Rossum f227252c21 The parser now also needs to link with mysnprintf.o. 2001-12-04 03:54:08 +00:00
Tim Peters 88e138c842 PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf. 2001-12-04 03:36:01 +00:00
Tim Peters 1ca1296157 The parser doesn't need its own implementation of assert, and having its
own interfered with including Python.h.  Remove Python's assert.h.
2001-12-04 03:18:48 +00:00
Jeremy Hylton db5a93cd6a Update docs to reflect new compile() and compileFile() 2001-12-04 02:48:52 +00:00
Jeremy Hylton 86424e333f SF bug #488687 reported by Neal Norwitz
The error for assignment to __debug__ used ste->ste_opt_lineno instead
of n->n_lineno.  The latter was at best incorrect; often the slot was
uninitialized.  Two fixes here: Use the correct lineno for the error.
Initialize ste_opt_lineno in PySymtable_New(); while there are no
current cases where it is referenced unless it has already been
assigned to, there is no harm in initializing it.
2001-12-04 02:41:46 +00:00
Tim Peters 22a51efc1c More sprintf -> PyOS_snprintf. 2001-12-04 01:11:32 +00:00
Fred Drake b38784e4a0 Slightly improved indexing for the string-% operator, thanks to comments
from Skip Montanaro.  There is one weirdness in the final index for HTML, but
that is low priority.
2001-12-03 22:15:56 +00:00
Fred Drake fcf94681ed Update lambda description to reflect nested scopes. This was noted by
Andrew Koenig.
2001-12-03 21:47:37 +00:00
Fred Drake 1a76386194 Added documentation on the ScrolledText module. 2001-12-03 21:18:30 +00:00
Andrew M. Kuchling c54fc3179f Oops! Forgot the value parameter. 2001-12-03 20:58:29 +00:00
Andrew M. Kuchling 9455df2a5a Add __delete__ method of properties
Reflow paragraph
2001-12-03 20:55:37 +00:00
Tim Peters c8996f5965 posix_execve(), posix_spawnve(), posix_putenv():
sprintf -> PyOS_snprintf.  This is the last of this
stuff I intend to do.
2001-12-03 20:41:00 +00:00
Guido van Rossum 354797ccad Fix the final two issues in Armin Rigo's SF bug #488477: apply_slice()
and assign_slice() weren't properly DECREF'ing the temporary slice
object they created.  (Shame on me. :-)
2001-12-03 19:45:06 +00:00
Guido van Rossum bb8f59a371 unpack_iterable(): Add a missing DECREF in an error case. Reported by
Armin Rigo (SF bug #488477).  Added a testcase to test_unpack_iter()
in test_iter.py.
2001-12-03 19:33:25 +00:00
Just van Rossum 2009aa66b4 removed some dead code. 2001-12-03 19:27:38 +00:00
Barry Warsaw c44d2c52c9 decode(), encode(): Accepting the minor optimizations from SF patch
#486375, but not the rest of it, since that changes the documented
semantics of encode().
2001-12-03 19:26:40 +00:00
Guido van Rossum be5234610a function_call(): Remove a bogus (and I mean *really* bogus) call to
Py_DECREF(arg) after the PyErr_NoMemory() call.  (Armin Rigo, SF bug
#488477.)
2001-12-03 19:22:38 +00:00
Fred Drake 1da50f6c6e Add a scalar product to the example list comprehensions based on a suggestion
sent to python-docs.
2001-12-03 18:54:33 +00:00
Barry Warsaw f4c20d354c LIBSUBDIRS: Add test/data so it gets installed and test_email.py can
pass.  Closes SF # 485080
2001-12-03 18:51:41 +00:00
Fred Drake 5172adca81 Minor clarification of the zip() description, based on a comment sent to
python-docs.
2001-12-03 18:35:05 +00:00
Fred Drake 14f5c5fa01 Make no assumption about how modules are built when referring to them; this
can vary by platform and installation.
Based on suggestion to python-docs.
2001-12-03 18:33:13 +00:00
Fred Drake 1722e4a952 Re-word the intro slightly to avoid reader misunderstanding: strings are not
mutable!  We do not want to shock anyone.
This closes SF bug #483805.

Re-factor so that the description of the "access" keyword parameter is not
repeated in both the descriptions of mmap().  Also, only make sure the first
description of mmap() appears in the index.  The the index link is followed,
the first is now used to locate the page on the screen; chances are really good
both will be visible.  This avoids the problem that the index entry for the
second is selected and the first version is not visible, making the reader
consider that mmap() is not available on Windows.
2001-12-03 18:27:22 +00:00
Just van Rossum cee949f945 Removed old and broken AE-based browser controller, use webbrowser.py
instead. This fixes bug #488420.
2001-12-03 18:11:36 +00:00
Fred Drake 551ffae30c Clarify that the Python runtime may behave mysteriously when an exception
is not handled properly.
This closes SF bug #485153.
2001-12-03 17:56:09 +00:00
Fred Drake 3570551d6f Remove most references to __members__ and __methods__, leaving only one pair
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420.
2001-12-03 17:32:27 +00:00
Fred Drake 248b04383f Convert to using string methods instead of the string module.
In goahead(), use a bound version of rawdata.startswith() since we use the
same method all the time and never change the value of rawdata.  This can
save a lot of bound method creation.
2001-12-03 17:09:50 +00:00
Fred Drake 073148c4ef Add a test that makes sure unclosed entity references are handled consitently. 2001-12-03 16:44:09 +00:00
Fred Drake f07125ee53 PyErr_Format() does not return a new reference; it always returns NULL.
This closes SF bug #488387.
2001-12-03 16:36:43 +00:00
Guido van Rossum dbb53d9918 Fix of SF bug #475877 (Mutable subtype instances are hashable).
Rather than tweaking the inheritance of type object slots (which turns
out to be too messy to try), this fix adds a __hash__ to the list and
dict types (the only mutable types I'm aware of) that explicitly
raises an error.  This has the advantage that list.__hash__([]) also
raises an error (previously, this would invoke object.__hash__([]),
returning the argument's address); ditto for dict.__hash__.

The disadvantage for this fix is that 3rd party mutable types aren't
automatically fixed.  This should be added to the rules for creating
subclassable extension types: if you don't want your object to be
hashable, add a tp_hash function that raises an exception.

Also, it's possible that I've forgotten about other mutable types for
which this should be done.
2001-12-03 16:32:18 +00:00
Guido van Rossum cb33165ca2 _tryorder should always be a list, then the problem Jack had to fix in
1.24 wouldn't have occurred in the first place.

Remove a debug print command accidentally inserted by Martin in 1.23.
2001-12-03 15:51:31 +00:00
Guido van Rossum cdbbd0a59d New about super. 2001-12-03 15:46:59 +00:00
Jack Jansen 55c5abb52f Missing comma in tuple initializer caused webbrowser.open() not to work at
all in MacPython. (why did noone ever notice this?)
2001-12-03 15:44:17 +00:00
Guido van Rossum 5b443c6282 Address SF patch #480716 as well as related issues.
SF patch #480716 by Greg Chapman fixes the problem that super's
__get__ method always returns an instance of super, even when the
instance whose __get__ method is called is an instance of a subclass
of super.

Other issues fixed:

- super(C, C()).__class__ would return the __class__ attribute of C()
  rather than the __class__ attribute of the super object.  This is
  confusing.  To fix this, I decided to change the semantics of super
  so that it only applies to code attributes, not to data attributes.
  After all, overriding data attributes is not supported anyway.

- While super(C, x) carefully checked that x is an instance of C,
  super(C).__get__(x) made no such check, allowing for a loophole.
  This is now fixed.
2001-12-03 15:38:28 +00:00
Guido van Rossum 22f9c6ddb8 Add Greg Chapman. 2001-12-03 15:37:40 +00:00
Martin v. Löwis 8f1ea71eab Add more inline documentation, as contributed in #487906. 2001-12-03 08:24:52 +00:00
Fred Drake b22c6720aa Clean up some material that is not part of the standard documentation.
This closes SF bug #487308.
2001-12-03 06:12:23 +00:00
Tim Peters 9161c8b0a1 PyString_FromFormatV, string_repr: document why these use sprintf
instead of PyOS_snprintf; add some relevant comments and asserts.
2001-12-03 01:55:38 +00:00
Guido van Rossum 4b80085ddd Fix for SF bug #485678.
slot_tp_descr_set(): When deleting an attribute described by a
descriptor implemented in Python, the descriptor's __del__ method is
called by the slot_tp_descr_set dispatch function.  This is bogus --
__del__ already has a different meaning. Renaming this use of __del__
is renamed to __delete__.
2001-12-03 00:54:52 +00:00
Tim Peters faad5ad590 mysnprintf.c: Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to
use wrappers on all platforms, to make this as consistent as possible x-
platform (in particular, make sure there's at least one \0 byte in
the output buffer).  Also document more of the truth about what these do.

getargs.c, seterror():  Three computations of remaining buffer size were
backwards, thus telling PyOS_snprintf the buffer is larger than it
actually is.  This matters a lot now that PyOS_snprintf ensures there's a
trailing \0 byte (because it didn't get the truth about the buffer size,
it was storing \0 beyond the true end of the buffer).

sysmodule.c, mywrite():  Simplify, now that PyOS_vsnprintf guarantees to
produce a \0 byte.
2001-12-03 00:43:33 +00:00
Steven M. Gava 17d0154097 further work on new configuration system, specifically,
on keybinding configuration
2001-12-03 00:37:28 +00:00
Jack Jansen 20ffa0e5bc A system() lookalike that sends commands to ToolServer, by Daniel Brotsky. The semantics aren't enough like system() to add this to the main Lib folder, but it is pretty useful nonetheless for selected people. 2001-12-03 00:11:35 +00:00
Guido van Rossum 1d5b3f29ff Fix for SF bug #485678.
slot_tp_descr_set(): When deleting an attribute described by a
descriptor implemented in Python, the descriptor's __del__ method is
called by the slot_tp_descr_set dispatch function.  This is bogus --
__del__ already has a different meaning. Renaming this use of __del__
is renamed to __delete__.
2001-12-03 00:08:33 +00:00
Jack Jansen 55070f5d96 Changed logic for finding python home in Mac OS X framework Pythons.
Now sys.executable points to the executable again, in stead of to
the shared library. The latter is used only for locating the python
home.
2001-12-02 23:56:28 +00:00
Jack Jansen 398c236c1b Added tests expected to be skipped on Mac OS X. 2001-12-02 21:41:36 +00:00
Martin v. Löwis f8a6f241b3 Check for NULL return value of PyList_New (follow-up to patch #486743). 2001-12-02 18:31:02 +00:00
Martin v. Löwis d132750206 Patch 487906: update inline docs. 2001-12-02 18:09:41 +00:00
Fred Drake c7b78381da Another name. 2001-12-02 15:13:35 +00:00
Fred Drake d745b4e7a4 Add reference to the "String Methods" section to make that information
easier to find.  Based on the comment from Steve Alexander on the
zope-coders mailing list.
2001-12-02 15:10:46 +00:00
Martin v. Löwis 95b057e3ea Patch #487784: Support Unicode commands in popen3/4 handling on UNIX. 2001-12-02 13:32:15 +00:00