| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed the ifilter flag wart by splitting it into two simpler functions.
* Fixed comment tabbing in C code.
* Factored module start-up code into a loop.
Documentation:
* Re-wrote introduction.
* Addede examples for quantifiers.
* Simplified python equivalent for islice().
* Documented split of ifilter().
Sets.py:
* Replace old ifilter() usage with new.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__ne__ no longer complain if they don't know how to compare to the other
thing. If no meaningful way to compare is known, saying "not equal" is
sensible. This allows things like
if adatetime in some_sequence:
and
somedict[adatetime] = whatever
to work as expected even if some_sequence contains non-datetime objects,
or somedict non-datetime keys, because they only call __eq__.
It still complains (raises TypeError) for mixed-type comparisons in
contexts that require a total ordering, such as list.sort(), use as a
key in a BTree-based data structure, and cmp().
|
| |
|
|
|
|
|
| |
off-line readers
- fix some minor typos and markup errors
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
| |
Backport candidate.
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
continuing to call these "time tuples" is misleading at best.
Closes SF bug #671731; will backport to 2.2.x.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Correct description of PyFloat_FromString. While ignored, the pend
argument still has to be given.
* Typo in PyLong_FromString.
|
|
|
|
|
|
| |
description since while there, it is useless and ignored, according to Tim's
commen. (PyInt_FromString is also not described, but PyLong_FromString is.
Is the former deprecated?)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error handers in the Unicode codecs: Negative
positions are treated as being relative to the end of
the input and out of bounds positions result in an
IndexError.
Also update the PEP and include an explanation of
this in the documentation for codecs.register_error.
Fixes a small bug in iconv_codecs: if the position
from the callback is negative *add* it to the size
instead of substracting it.
From SF patch #677429.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
more, to make it easier to tell apart from the verbatim content.
|
|
|
|
| |
interfere with the flow of the sentence.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
that should stand out.
|
|
|
|
| |
between the "note" and "warning" flavors.
|
|
|
|
|
|
| |
* remove doc for defunct IllegalKeywordArgument exception
* add note that HTTP class is for backward compatibility and refer reader to
online docstrings for help
|
| |
|
|
|
|
|
|
| |
Replace existing doc with new version from Vinay.
Fixed markup and wrapped long lines from patch.
Needs review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compare against "the other" argument, we raise TypeError,
in order to prevent comparison from falling back to the
default (and worse than useless, in this case) comparison
by object address.
That's fine so far as it goes, but leaves no way for
another date/datetime object to make itself comparable
to our objects. For example, it leaves Marc-Andre no way
to teach mxDateTime dates how to compare against Python
dates.
Discussion on Python-Dev raised a number of impractical
ideas, and the simple one implemented here: when we don't
know how to compare against "the other" argument, we raise
TypeError *unless* the other object has a timetuple attr.
In that case, we return NotImplemented instead, and Python
will give the other object a shot at handling the
comparison then.
Note that comparisons of time and timedelta objects still
suffer the original problem, though.
|
| |
|
|
|
|
|
|
| |
This gives much the same treatment to datetime.fromtimestamp(stamp, tz) as
the last batch of checkins gave to datetime.now(tz): do "the obvious"
thing with the tz argument instead of a senseless thing.
|
| |
|
|
|
|
|
|
|
|
|
| |
tzinfo.fromutc() method. The C code doesn't implement any of this
yet (well, not the C code on the machine I'm using now), nor does
the test suite reflect it. The Python datetime.py implementation and
test suite in the sandbox do match these doc changes. The C
implementation probably won't catch up before Thursday (Wednesday is
a scheduled "black hole" day this week <0.4 wink>).
|
|
|
|
| |
tzinfo dst() should return timedelta(0) if DST is not effect, not 0.
|