summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* - New builtin function enumerate(x), from PEP 279. Example:Guido van Rossum2002-04-261-0/+4
| | | | | enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.
* (py-comint-output-filter-function): Put the pop-to-buffer call insideBarry Warsaw2002-04-261-1/+1
| | | | | the `when' condition so other non-Python shell comint changes won't cause random buffers to pop.
* PyNumber_CoerceEx: this took a shortcut (not doing anything) when theGuido van Rossum2002-04-261-0/+4
| | | | | | | | | | | | | | | | | | | | | left and right type were of the same type and not classic instances. This shortcut is dangerous for proxy types, because it means that coerce(Proxy(1), Proxy(2.1)) leaves Proxy(1) unchanged rather than turning it into Proxy(1.0). In an ever-so-slight change of semantics, I now only take the shortcut when the left and right types are of the same type and don't have the CHECKTYPES feature. It so happens that classic instances have this flag, so the shortcut is still skipped in this case (i.e. nothing changes for classic instances). Proxies also have this flag set (otherwise implementing numeric operations on proxies would become nightmarish) and this means that the shortcut is also skipped there, as desired. It so happens that int, long and float also have this flag set; that means that e.g. coerce(1, 1) will now invoke int_coerce(). This is fine: int_coerce() can deal with this, and I'm not worried about the performance; int_coerce() is only invoked when the user explicitly calls coerce(), which should be rarer than rare.
* If Py_OptimizeFlag is false then always evaluate assert conditions, don'tNeil Schemenauer2002-04-261-0/+4
| | | | test __debug__ at runtime. Closes SF patch #548833.
* Fix typo in the setup of interpreter-mode-alist.Barry Warsaw2002-04-251-1/+1
|
* SF patch #510288 by Kevin J. Butler, mod'd by Barry. This providesBarry Warsaw2002-04-251-7/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | better auto-recognition of a Jython file vs. a CPython (or agnostic) file by looking at the #! line more closely, and inspecting the import statements in the first 20000 bytes (configurable). Specifically, (py-import-check-point-max): New variable, controlling how far into the buffer it will search for import statements. (py-jpython-packages): List of package names that are Jython-ish. (py-shell-alist): List of #! line programs and the modes associated with them. (jpython-mode-hook): Extra hook that runs when entering jpython-mode (what about Jython mode? <20k wink>). (py-choose-shell-by-shebang, py-choose-shell-by-import, py-choose-shell): New functions. (python-mode): Use py-choose-shell. (jpython-mode): New command. (py-execute-region): Don't use my previous hacky attempt at doing this, use the new py-choose-shell function. One other thing this file now does: it attempts to add the proper hooks to interpreter-mode-alist and auto-mode-alist if they aren't already there. Might help with Emacs users since that editor doesn't come with python-mode by default.
* (py-execute-region): Alexander Schmolck points out that leadingBarry Warsaw2002-04-251-0/+7
| | | | | whitespace can hose the needs-if test. So just skip all blank lines at the start of the region right off the bat.
* (py-comint-output-filter-function): Add a pop-to-buffer call so youBarry Warsaw2002-04-251-0/+1
| | | | | always get to see the result of e.g. a py-execute-region. Funny, this bugged both me /and/ Guido!
* (py-shell-hook): A new hook variable, run at the end of py-shell.Barry Warsaw2002-04-251-0/+14
| | | | | | | | | Allows for some customization of the underlying comint buffer. (py-shell): Call the new hook. (info-lookup-maybe-add-help): A new call suggested by Milan Zamazal to make lookups in the Info documentation easier.
* SF patch 546244 by John Williams: add Text.dump() method.Guido van Rossum2002-04-232-0/+3
|
* SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)Anthony Baxter2002-04-231-0/+4
| | | | | | | | | | | | closes SF #514433 can now pass 'None' as the filename for the bsddb.*open functions, and you'll get an in-memory temporary store. docs are ripped out of the bsddb dbopen man page. Fred may want to clean them up. Considering this for 2.2, but not 2.1.
* Merge in Skip's last few updates w.r.t. py-help-at-point:Barry Warsaw2002-04-221-2/+6
| | | | | | | | (py-mode-map): Bind py-help-at-point to f1 as well as C-c C-h (py-help-at-point): Make sure the symbol is quoted so things like pydoc.help('sys.platform') work correctly. Also, leave the *Python Output* buffer in help-mode; this may be a bit more controversial.
* Some contributions and ideas by Alexander Schmolck: add a keybindingBarry Warsaw2002-04-221-9/+52
| | | | | | | | | | | | | | | | | | | to call pychecker on the current file, add a face for pseudo keywords self, None, True, False, and Ellipsis. Specifically, (py-pychecker-command, py-pychecker-command-args): New variables. (py-pseudo-keyword-face): New face variable, defaulting to a copy of font-lock-keyword-face. (python-font-lock-keywords): Add an entry for self, None, True, False, Ellipsis to be rendered in py-pseudo-keyword-face. (py-pychecker-history): New variable. (py-mode-map): Bind C-c C-w to py-pychecker-run. (py-pychecker-run): New command.
* Skip Montanaro's contribution (slightly mod'd by Barry) to provide aBarry Warsaw2002-04-221-4/+54
| | | | | | | | | | | | | | "help-on-symbol-at-point" feature which uses pydoc to provide help on the symbol under point, if available. Mods include some name changes, a port to Emacs, binding the command to C-c C-h, and providing a more informative error message if the symbol's help can't be found (through use of a nasty bare except). Note also that py-describe-mode has been moved off of C-c C-h m; it's now just available on C-c ? Closes SF patch #545439.
* (py-execute-region): If the line at the beginning of the region is aBarry Warsaw2002-04-221-6/+11
| | | | | | | | | | | | | | | #! line, use the command on that line as the shell command to use to execute the region. I.e. if the region looks like ---------------- #! /usr/bin/env python1.5 print 'hello world'.startswith('hello') ---------------- you'll get an exception! :) This closes SF bug #232398.
* (py-execute-region): If you ran this without having visited aBarry Warsaw2002-04-221-45/+23
| | | | | | | | | | | | | | | | | | python-mode file, py-which-shell would have been nil and the command to use would not get set correctly. This changes things so that 1) the temporary file has a .py extension, 2) the temporary file is put into python-mode, and 3) the temporary file's py-which-shell is captured in a local `shell' variable, which is used to calculate the command to use. Closes SF bug #545436. (py-parse-state): Rip out the XEmacs-specific calls to buffer-syntactic-context, which can get quite confused if there's an open paren in column zero say, embedded in a triple quoted string. This was always a performance hack anyway, and computers are fast enough now that we should be able to get away with the slower, more portable, full-parse branch. Closes SF bug #451841. Update the comments at the top of the file.
* Enable universal newlines on Windows. Note that NEWS needs more words!Tim Peters2002-04-211-0/+3
|
* Forward port of patch # 500311: Work around for buggy https servers.Martin v. Löwis2002-04-201-0/+1
| | | | Fixes #494762.
* Get the right funny characters in Hernan's name.Tim Peters2002-04-191-0/+1
|
* Added note about new distutils commands.Marc-André Lemburg2002-04-171-0/+9
|
* Windows installer: disabled Wise's "delete in-use files" uninstallTim Peters2002-04-161-0/+4
| | | | | | | | option. It was the cause of at least one way UNWISE.EXE could vanish (install a python; uninstall it; install it again; reboot the machine; abracadabra the uinstaller is gone). Bugfix candidate, but I'll backport it myself.
* Apply the second version of SF patch http://www.python.org/sf/536241Walter Dörwald2002-04-151-0/+4
| | | | | | | | | | Add a method zfill to str, unicode and UserString and change Lib/string.py accordingly. This activates the zfill version in unicodeobject.c that was commented out and implements the same in stringobject.c. It also adds the test for unicode support in Lib/string.py back in and uses repr() instead() of str() (as it was before Lib/string.py 1.62)
* Add news about deprecated complex ops.Guido van Rossum2002-04-151-0/+4
|
* Four more names for the hall of fame.Guido van Rossum2002-04-151-0/+4
|
* Patch #543447: Add posix.mknod.Martin v. Löwis2002-04-141-0/+2
|
* News for strip methods.Guido van Rossum2002-04-131-0/+4
|
* Add news about memory managent APIs changing.Neil Schemenauer2002-04-121-0/+5
|
* News about dict.pop().Guido van Rossum2002-04-121-0/+3
|
* Spell Raymond Hettinger's name writeNeal Norwitz2002-04-121-1/+1
|
* Add Raymond Hettinger, CPA.Guido van Rossum2002-04-121-0/+1
|
* Patch #512005: getrusage() returns struct-like object.Martin v. Löwis2002-04-082-1/+3
|
* - A type can now inherit its metatype from its base type. Previously,Guido van Rossum2002-04-081-0/+7
| | | | | | | | | | when PyType_Ready() was called, if ob_type was found to be NULL, it was always set to &PyType_Type; now it is set to base->ob_type, where base is tp_base, defaulting to &PyObject_Type. - PyType_Ready() accidentally did not inherit tp_is_gc; now it does. Bugfix candidate.
* - Changed new-style class instantiation so that when C's __new__Guido van Rossum2002-04-061-0/+4
| | | | | method returns something that's not a C instance, its __init__ is not called. [SF bug #537450]
* Some more news.Guido van Rossum2002-04-061-0/+4
|
* Comment about UTF-16 changes.Marc-André Lemburg2002-04-051-0/+6
|
* SF bug 497854: Short-cuts missing for All UsersTim Peters2002-04-041-1/+6
| | | | | | Fix Windows-specific install glitch. Tested on Win2K, but I can't test on XP. Already checked in to the release22-maint branch.
* Add note about changes in xml.sax.expatreader.Fred Drake2002-04-041-0/+4
|
* Removed old Digital Creations copyright/license notices (withGuido van Rossum2002-04-041-1/+1
| | | | | permission from Paul Everitt). Also removed a few other references to Digital Creations and changed the remaining ones to Zope Corporation.
* Added note about updated freeze.py Tool.Marc-André Lemburg2002-04-041-0/+4
|
* Add a note about bool.Guido van Rossum2002-04-041-0/+6
|
* Eliminate DONT_SHARE_SHORT_STRINGS.Tim Peters2002-03-301-3/+3
|
* Patch #527027: Allow building python as shared library.Martin v. Löwis2002-03-292-0/+3
|
* Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols.Tim Peters2002-03-291-0/+4
|
* News for SF #535905.Guido van Rossum2002-03-291-0/+6
|
* Expose C library's gettext. Fixes #516412.Martin v. Löwis2002-03-271-0/+2
|
* Change sys_exit to use METH_VARARGS.Neal Norwitz2002-03-271-0/+3
| | | | sys.exit() now requires 0-1 arguments. Previously 2+ arguments were allowed.
* Add news about pymalloc being enabled.Neil Schemenauer2002-03-221-0/+9
|
* [Apply SF patch #504943]Walter Dörwald2002-03-211-0/+2
| | | | | | This patch makes it possible to pass Warning instances as the first argument to warnings.warn. In this case the category argument will be ignored. The message text used will be str(warninginstance).
* (py-temp-directory): Add /var/tmp to the list of directories thisBarry Warsaw2002-03-181-3/+4
| | | | | | searches. This is added after /tmp. Closes SF bug #505488, except that /var/tmp comes after /tmp instead of the patch's suggestion of putting it before /usr/tmp.
* Patch #495598: add an -q (quiet) option to pycompile.Martin v. Löwis2002-03-181-0/+2
|