- 05 Oct, 2001 7 commits
-
-
Tim Peters authored
foo\d when it was clearly intended to render as foo$ Fred, is this a right way to fix it? If not, the earlier place in the same paragraph that does render as foo$ is also wrong.
-
Barry Warsaw authored
so that it can be suppressed.
-
Guido van Rossum authored
-
Fred Drake authored
This closes SF patch #460737.
-
Fred Drake authored
-
Guido van Rossum authored
Give Fred his Jr.
-
Andrew M. Kuchling authored
-
- 04 Oct, 2001 28 commits
-
-
Martin v. Löwis authored
-
Martin v. Löwis authored
-
Fred Drake authored
-
Fred Drake authored
-
Guido van Rossum authored
This patch allows ConfigParser.getboolean() to interpret TRUE, FALSE, YES, NO, ON and OFF instead just '0' and '1'. While just allowing '0' and '1' sounds more correct users often demand to use more descriptive directives in configuration files. Instead of forcing every programmer do brew his own solution a system should include the batteries for this. [My modification to the patch is a slight rewording of the docstring and use of lowercase instead of uppercase templates. The code is still case sensitive. GvR.]
-
Fred Drake authored
error message. run_unittest(): Provide the testclass to run_suite() so it can construct the error message. This closes SF bug #467763.
-
Guido van Rossum authored
-
Tim Peters authored
not other control characters string.rstrip() got rid of. This caters to the \f thingies Barry likes putting in Python source files.
-
Fred Drake authored
The new profiler event stream includes a "return" event even when an exception is being propogated, but the machinery that called the profile hook did not save & restore the exception. In debug mode, the exception was detected during the execution of the profile callback, which did not have the proper internal flags set for the exception. Saving & restoring the exception state solves the problem.
-
Barry Warsaw authored
"listify an iterator".
-
Barry Warsaw authored
-
Barry Warsaw authored
into tests/data/msg_*.txt files.
-
Barry Warsaw authored
-
Guido van Rossum authored
-
Barry Warsaw authored
optional, and default to `localhost' and ports 8025 and 25 respectively. SMTPChannel.__init__(): Calculate __fqdn using socket.getfqdn() instead of gethostby*() and friends. This allows us to run this script even if we don't have access to dns (assuming the localhost is configured properly). Also, restore my precious page breaks. Hands off, oh Whitespace Normalizer!
-
Greg Ward authored
to make the SGI C compiler happier (bug #445960).
-
Greg Ward authored
on IRIX 6.5).
-
Fred Drake authored
-
Fred Drake authored
The profiler does not need to know anything about the exception state, so we no longer call it when an exception is raised. We do, however, make sure we *always* call the profiler when we exit a frame. This ensures that timing events are more easily isolated by a profiler and finally clauses that do a lot of work don't have their time mis-allocated. When an exception is propogated out of the frame, the C callback for the profiler now receives a PyTrace_RETURN event with an arg of NULL; the Python-level profile hook function will see a 'return' event with an arg of None. This means that from Python it is impossible for the profiler to determine if the frame exited with an exception or if it returned None, but this doesn't matter for profiling. A C-based profiler could tell the difference, but this doesn't seem important. ceval.c:eval_frame(): Simplify the code in two places so that the profiler is called for every exit from a frame and not for exceptions. sysmodule.c:profile_trampoline(): Make sure we don't expose Python code to NULL; use None instead.
-
Guido van Rossum authored
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
normalization. Now uses \t in strings instead of hard tabs.
-
Tim Peters authored
classes (sheesh!).
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
For a dynamically constructed type object, fill in the tp_doc slot with a copy of the argument dict's "__doc__" value, provided the latter exists and is a string. NOTE: I don't know what to do if it's a Unicode string, so in that case tp_doc is left NULL (which shows up as Py_None if you do Class.__doc__). Note that tp_doc holds a char*, not a general PyObject*.
-
Guido van Rossum authored
it deals correctly with some anomalous cases; according to this test suite I've fixed it right. The anomalous cases had to do with 'exception' events: these aren't generated when they would be most helpful, and the profiler has to work hard to recover the right information. The problems occur when C code (such as hasattr(), which is used as the example here) calls back into Python code and clears an exception raised by that Python code. Consider this example: def foo(): hasattr(obj, "bar") Where obj is an instance from a class like this: class C: def __getattr__(self, name): raise AttributeError The profiler sees the following sequence of events: call (foo) call (__getattr__) exception (in __getattr__) return (from foo) Previously, the profiler would assume the return event returned from __getattr__. An if statement checking for this condition and raising an exception was commented out... This version does the right thing.
-
- 03 Oct, 2001 5 commits
-
-
Fred Drake authored
This reflects what is currently in CVS, which may change before 2.2 is final.
-
Fred Drake authored
-
Fred Drake authored
-
Greg Ward authored
-
Andrew M. Kuchling authored
-