| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* promote the example and the documented restrictions to \subsection status
* document the flag parameter of the DbfilenameShelf class
|
|
|
|
|
|
|
|
|
|
|
|
| |
When daylight time ends, an hour repeats on the local clock (for example,
in US Eastern, the clock jumps from 1:59 back to 1:00 again). Times in
the repeated hour are ambiguous. A tzinfo subclass that wants to play
with astimezone() needs to treat times in the repeated hour as being
standard time. astimezone() previously required that such times be
treated as daylight time. There seems no killer argument either way,
but Guido wants the standard-time version, and it does seem easier the
new way to code both American (local-time based) and European (UTC-based)
switch rules, and the astimezone() implementation is simpler.
|
| |
|
|
|
|
|
| |
Backport candidate. All but one or two of these changes
are applicable to 2.2.2.
|
| |
|
| |
|
| |
|
|
|
|
| |
sometimes.
|
| |
|
| |
|
|
|
|
| |
(Someone please review what I wrote for accuracy.)
|
|
|
|
|
| |
Note, that list.sort() is undefined for lists of sets.
Add the ... prompt to the example so it runs in doctest.
|
| |
|
| |
|
|
|
|
| |
C API section by mistake
|
|
|
|
| |
Mention deprecation of string exceptions
|
|
|
|
| |
'%s' % u'x' return a unicode object.
|
| |
|
|
|
|
|
|
|
| |
The interpreter doesn't crash, but it does call exit() in libncurses.
Add a note to this effect.
Will backport
|
| |
|
|
|
|
| |
Change a couple of list -> mylist
|
|
|
|
|
|
|
|
|
|
| |
Clarified that not all types are included. The OP was looking for a
StaticMethodType.
Also, added a note and example suggesting the use of int,str, etc.
instead of IntType, StrType, etc.
Renamed the crummy variable name in the example from "list" to "mylist".
|