| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Yuck.
|
|
|
|
|
| |
handle sentences like this:
And she said, "Go to hell!" Can you believe that?
|
|
|
|
|
|
|
|
| |
sentences are separated by two spaces.
Improve _fix_sentence_endings() a bit -- look for ".!?" instead of just
".", and factor out the list of sentence-ending punctuation characters
to a class attribute.
|
|
|
|
| |
according to the conventions that I (and Tim Peters) learned in school.
|
|
|
|
| |
returned.
|
|
|
|
| |
timeout socket patch design.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not sure this is better in all cases.
parse(): Fixed a bug in the output; the dict is referred to in the
code as `countries' not `country'. Also added no-case-fold for the
string "U.S." since the Virgin Islands name no longer wraps those in
parentheses.
main(): Fixed the argument parsing to agree with the docstring, i.e.
--outputdict instead of --output.
In the module docstring:
- updated my email address
- we don't need to explain about Python 1.5 regexps <wink>
We also don't need to wrap the import of re with a try/except.
Other style fixes:
- untabification
- revert back to <> style everywhere (and consistently)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch replaces string module functions with string
methods in the Tools/world/world scripts.
It also updates two outdated URLs and the countrycodes
dictionary.
It fixes a bug where result of string.find() was checked
for truth instead of compared with -1.
It also replaces <> with != in two spots.
|
| |
|
|
|
|
| |
and fromfd.
|
| |
|
|
|
|
| |
fromfd() assumes a blocking non-timeout socket.
|
|
|
|
|
|
|
|
|
|
| |
settimeout(). Already, settimeout() canceled non-blocking mode; now,
setblocking() also cancels the timeout. This is easier to document.
(XXX should settimeout(0) be an alias for setblocking(0)? They seem
to have roughly the same effect. Also, I'm not sure that the code in
connect() and accept() is correct in all cases. We'll sort this out
soon enough.)
|
| |
|
|
|
|
| |
cleanup as well, e.g. renamed NTinit to os_init.
|
| |
|
|
|
|
| |
delimiters. Also repaired some docstrings and comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not testing it -- apparently test_timeout.py doesn't test anything
useful):
In internal_select():
- The tv_usec part of the timeout for select() was calculated wrong.
- The first argument to select() was one too low.
- The sense of the direction argument to internal_select() was
inverted.
In PySocketSock_settimeout():
- The calls to internal_setblocking() were swapped.
Also, repaired some comments and fixed the test for the return value
of internal_select() in sendall -- this was in the original patch.
|
| |
|
|
|
|
| |
this is what he meant. :-)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.
I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this. Next I'm going to try it Windows before
Tim complains.
No way is this a bugfix candidate. :-)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.
I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this. Next I'm going to try it Windows before
Tim complains.
No way is this a bugfix candidate. :-)
|
| |
|
|
|
|
|
|
|
|
| |
otherwise this code could segfault:
from socket import socket
s = socket.__new__(socket)
s.recv(100)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Straightforward fix. Will backport to 2.2. If there's ever a new 2.1
release, this could be backported there too (since it's an issue with
anything that's got both a __reduce__ and a __setstate__).
|
|
|
|
|
|
| |
Straightforward fix. Will backport to 2.2. If there's ever a new 2.1
release, this could be backported there too (since it's an issue with
anything that's got both a __reduce__ and a __setstate__).
|
|
|
|
|
|
| |
This uses cgi.parse_header() in Checker.checkforhtml(), so that
webchecker recognises the mime type text/html even if options
are specified.
|
|
|
|
|
| |
Made conversion failure error messages consistent between types.
Added related unittests.
|
| |
|
|
|
|
|
| |
The specific warning is that clean didn't find a directory that should
be removed if it exists.
|
|
|
|
|
| |
out how to just activate my code on platforms where I know it works
(currently only linux/x86).
|
| |
|
| |
|
|
|
|
|
|
| |
equivalent attributes in a few more spots.
This closes SF patch http://www.python.org/sf/562373
|
| |
|
|
|
|
|
| |
Also, added more regression tests to cover the new type and test its
conformity with range().
|
|
|
|
| |
(instead of __init__)
|