[New-bugs-announce] [issue5530] datetime class names should obey PEP 8 CapWords convention

Jess Austin report at bugs.python.org
Sat Mar 21 06:02:41 CET 2009

New submission from Jess Austin <jess.austin at gmail.com>:

Class names that comply with the CapWords naming convention described in
PEP 8 (http://www.python.org/dev/peps/pep-0008/) are preferred. See the
recent discussion that included the BDFL's recommendations at

Per those recommendations, the attached patch updates every class to
expose a CapWords name to python:

datetime.timedelta  -->  datetime.TimeDelta
datetime.date       -->  datetime.Date
datetime.tzinfo     -->  datetime.TZInfo
datetime.time       -->  datetime.Time
datetime.datetime   -->  datetime.DateTime

In addition, the old lowercase names are reproduced as derived classes,
the methods of which throw PendingDeprecationWarning, and the docstrings
of which advise using the new CapWords class names. The test_datetime.py
unit test is updated to check for proper functionality and for the
presence of the pending deprecation warnings. (This patch relies on the
previously-submitted refactoring patch attached to Issue 5520,
http://bugs.python.org/issue5520.) Various other tests and support files
are updated to use the new CapWords class names.

The current patch still fails one test in test_datetime.py, due to
previously-existing Issue 5516, http://bugs.python.org/issue5516.

This patch includes no documentation updates.

components: Library (Lib)
files: pending_dep.diff
keywords: patch
messages: 83921
nosy: jess.austin
severity: normal
status: open
title: datetime class names should obey PEP 8 CapWords convention
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file13386/pending_dep.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list