| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fix pydoc when doing help for: and, or, not, UNICODE.
Will backport.
|
| |
|
|
|
|
|
|
|
| |
Make length an int so we get the right value from
PyArg_ParseTuple(args, "s#", &str, &length)
Will backport.
|
|
|
|
|
|
| |
atomically, but deepcopy() didn't support this at all.
I don't see any reason for this, so I'm adding ClassType
to the set of types that are deep-copied atomically.
|
|
|
|
|
| |
Rewrote copy() and deepcopy() without avoidable try/except statements;
getattr(x, name, None) or dict.get() are much faster than try/except.
|
|
|
|
|
|
|
| |
eventProc (which simply drops all events on the floor). Also added a
method SetDefaultEventProc through which frameworks can set a global
event handler (which can still be overridden on a per-call basis
with the eventProc argument).
|
|
|
|
| |
(Yes, this is an incompatibility. I'll document it in PEP 307.)
|
|
|
|
|
| |
off-line readers
- fix some minor typos and markup errors
|
|
|
|
|
| |
too hard to read.
* Simplified previous changes to izip() to make it easier to read.
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed typo in exception message for times()
* Filled in missing times_traverse()
* Document reasons that imap() did not adopt a None fill-in feature
* Document that count(sys.maxint) will wrap-around on overflow
* Add overflow test to islice()
* Check that starmap()'s argument returns a tuple
* Verify that imap()'s tuple re-use is safe
* Make a similar tuple re-use (with safety check) for izip()
|
|
|
|
|
|
| |
Even with the extra work to cleanup the env, *BSD still leaks. Add a note.
Will backport.
|
|
|
|
| |
Closes SF bug #680797.
|
|
|
|
|
|
| |
Reverting one of those irritating "security fixes". fdopen() opens
files in binary mode. That makes pydoc skip the \r\n on Windows that's
need to make the output readable in the shell. Screw it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
pickle.py, where it makes save_newobj() unnecessary. Tests pass.
|
|
|
|
| |
used everywhere).
|
| |
|
| |
|
|
|
|
| |
Use re module instead of regex
|
|
|
|
|
|
| |
- subclasses of list or dict
- __reduce__ returning a 4-tuple or 5-tuple
- slots
|
|
|
|
|
| |
now crash because two arguments are expected. Add a default value
to keep those scripts running.
|
|
|
|
| |
Fix use of GetoptError, so demo() now works
|
| |
|
| |
|
|
|
|
| |
Backport candidate.
|
| |
|
| |
|
|
|
|
| |
coverage.
|
|
|
|
|
|
|
| |
Simply replace all uses of statcache with os.stat.
Should I add a DeprecationWarning triggered if the use_statcache argument
is supplied, so we can remove it in 2.4?
|
|
|
|
|
|
| |
Right now the test cases create a files and a directory in the temp.
directory. Raymond suggested checking files in to the test/ directory,
simplifying the setup/teardown methods; is that worth doing?
|
|
|
|
|
|
| |
Apparently MAC OS 9 doesn't have POSIX-conforming timestamps. A test
fails as a result, but at least for this specific test it's easy enough
to get the POSIX epoch out of it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
http://mechanicalcat.net/cgi-bin/log/python/turning_warnings_off.html)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch adds stdin, stdout as optional arguments to the cmd.Cmd
constructor (defaulting to sys.stdin, sys.stdout), and changes the Cmd
methods throughout to use self.stdout.write() and self.stdin.foo for
output and input. This allows much greater flexibility for using cmd -
for instance, hooking it into a telnet server.
Patch for library module and for documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-DCALL_PROFILE: Count the number of function calls executed.
When this symbol is defined, the ceval mainloop and helper functions
count the number of function calls made. It keeps detailed statistics
about what kind of object was called and whether the call hit any of
the special fast paths in the code.
Optimization:
When we take the fast_function() path, which seems to be taken for
most function calls, and there is minimal frame setup to do, avoid
call PyEval_EvalCodeEx(). The eval code ex function does a lot of
work to handle keywords args and star args, free variables,
generators, etc. The inlined version simply allocates the frame and
copies the arguments values into the frame.
The optimization gets a little help from compile.c which adds a
CO_NOFREE flag to code objects that don't have free variables or cell
variables. This change allows fast_function() to get into the fast
path with fewer tests.
I measure a couple of percent speedup in pystone with this change, but
there's surely more that can be done.
|
| |
|
| |
|
| |
|
|
|
|
| |
be bothered to fix it.
|
|
|
|
| |
the code.
|
|
|
|
|
|
|
| |
For the case where the current globals match the previous frame's
globals, eliminates three tests in two if statements. For the case
where we just get __builtins__ from a module, eliminate a couple of
tests.
|