[Python-Dev] Adding PEP consistent aliases for names that don'tcurrently conform

Raymond Hettinger python at rcn.com
Wed Mar 4 02:29:40 CET 2009


>>> It may be too late to rename the existing accidents, but why not add
>>> consistently-named aliases (socket.Socket, datetime.DateTime, etc) and
>>> strongly encourage their use in new code?
>
> Or make the old names aliases for the new names and start a
> PendingDeprecationWarning on the old names so they can be switched in the
> distant future?

Should the names in the __repr__ be changed now or later?

    >>> datetime(2008, 7, 31, 12, 0, 0)
    datetime.datetime(2008, 7, 31, 12, 0)


Raymond


More information about the Python-Dev mailing list