__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).
* imghdr.py: added jpeg recognition
* torgb.py: added jpeg conversion
* tzparse.py: use functions from time instead of calendar
* whatsound.py: add /ufs/guido/biin/sgi to $PATH when calling 'whatsound'
* calendar.py: remove stuff now built in time; some cleanup and
generalization in the calendar printing
* cmd.py: use __init__.
* tzparse.py: This module is no longer necessary -- use builtin time instead!
* Fixed calendar.py, mimetools.py, whrandom.py to cope with time.time()
returning a floating point number. (And fix old bug in calendar)
* Add recursion level to mainloop.mainloop(), to make it reentrant.