summaryrefslogtreecommitdiffstats
path: root/Lib/warnings.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | x in string.whitespace => x.isspace() type(x) in types.StringTypes => isinstance(x, basestring) isinstance(x, types.StringTypes) => isinstance(x, basestring) type(x) is types.StringType => isinstance(x, str) type(x) == types.StringType => isinstance(x, str) string.split(x, ...) => x.split(...) string.join(x, y) => y.join(x) string.zfill(x, ...) => x.zfill(...) string.count(x, ...) => x.count(...) hasattr(types, "UnicodeType") => try: unicode except NameError: type(x) != types.TupleTuple => not isinstance(x, tuple) isinstance(x, types.TupleType) => isinstance(x, tuple) type(x) is types.IntType => isinstance(x, int) Do not mention the string module in the rlcompleter docstring. This partially applies SF patch http://www.python.org/sf/562373 (with basestring instead of string). (It excludes the changes to unittest.py and does not change the os.stat stuff.)
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-1/+1
|
* As discussed on python-dev, add a mechanism to indicate featuresNeal Norwitz2002-05-291-0/+1
| | | | | that are in the process of deprecation (PendingDeprecationWarning). Docs could be improved.
* resetwarnings(): Remove extra space from docstring guts.Tim Peters2002-04-161-1/+1
|
* Whitespace normalization.Tim Peters2002-04-161-5/+5
|
* resetwarnings(): change the docstring to reflect what the codeTim Peters2002-04-161-1/+1
| | | | | | | actually does. Note that the description in the Library Reference manual is already accurate. Bugfix candidate.
* [Apply SF patch #504943]Walter Dörwald2002-03-211-5/+14
| | | | | | 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).
* Allow for the possibility that globals['__name__'] does not exist;Guido van Rossum2001-08-311-1/+4
| | | | | substitute "<string>" for the module name in that case. This actually occurred when running test_descr.py with -Dwarn.
* Ignore OverflowWarning by default. To enable the warning, useGuido van Rossum2001-08-231-0/+1
| | | | | | | | python -Wdefault or python -Wdefault::OverflowWarning
* final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro2001-03-011-0/+3
| | | | giving it a slight facelift
* Move a comment around to where it belongs (the code had alrady beenGuido van Rossum2001-02-281-1/+1
| | | | moved).
* Add a new API:Guido van Rossum2001-02-281-0/+10
| | | | | | | | | warn_explicit(message, category, filename, lineno, module, registry) The regular warn() call calculates a bunch of values and calls warn_explicit() with these. This will be used to issue better syntax warnings.
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-151-23/+23
|
* - Added keyword argument 'append' to filterwarnings(); if true, thisGuido van Rossum2001-01-141-5/+10
| | | | | | | appends to list of filters instead of inserting at the front. This is useful to add a filter with a lower priority than -W options. - Cosmetic improvements to a docstring and an error message.
* Improve error messages for invalid warning arguments; don't raiseGuido van Rossum2000-12-191-4/+10
| | | | exceptions but always print a warning message.
* Python part of the warnings subsystem.Guido van Rossum2000-12-151-0/+227