svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85728 | georg.brandl | 2010-10-19 20:54:25 +0200 (Di, 19 Okt 2010) | 1 line
#10092: Properly reset locale in Locale*Calendar classes. The context manager was buggy because setlocale() returns the *new* locale, not the old. Also add a test for this.
........
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
__getitem__() methods: compute only the new spellings needed to satisfy
the given indexing object. This is purely an optimization (it should
have no effect on visible semantics).
module.
The code is shorter, more readable, faster, and dramatically increases the
range of acceptable dates.
Also, used the floor division operator in leapdays().
Replaces the _center function in the calendar
module with the center method for strings.
For situations with uneven padding, the behavior is
slightly different in that the center method puts the
extra space on the right instead of the left.
One more time on this turkey, but duller instead of cleverer.
Curious: The docs say __getslice__ has been deprecated since 2.0, but
list.__getitem__ still doesn't work if you pass it a slice. This makes
it a lot clearer to emulate a list by *being* a list <wink>.
Bugfix candidate. Michael, just pile this patch on top of the others
that went by -- no need to try to pick these apart.
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names). This closes bug
#503202.
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
* deletes cache
* adds firstweekday and setfirstweekday functions that allow user to control
which day of the week is first when displaying calendars
* adds month, week, calendar functions that return their results instead of
printing them
* adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the
ordinal values of the weekdays
1. Comments at the beginning of the module, before
functions, and before classes have been turned
into docstrings.
2. Tabs are normalized to four spaces.
Also, removed the "remove" function from dircmp.py, which reimplements
list.remove() (it must have been very old).