On Tue, Mar 3, 2009 at 5:15 PM, Brett Cannon <br...@python.org> wrote: > > > On Tue, Mar 3, 2009 at 05:13, <rdmur...@bitdance.com> wrote: >> >> On Tue, 3 Mar 2009 at 06:01, Ivan KrstiÄ~G wrote: >>> >>> On Mar 2, 2009, at 7:08 PM, Steve Holden wrote: >>>> >>>> > > PS.: so is datetime.datetime a builtin then? :) >>>> > > Another historic accident. Like socket.socket. :-( >>>> > >>>> A pity this stuff wasn't addressed for 3.0. Way too late now, though.
A pity indeed. >>> 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? +1, if it's not done in a rush and only for high-visibility modules -- let's start with socket and datetime. We need a really long lead time before we can remove these. I recommend starting with a *silent* deprecation in 3.1 combined with a PR offensive for the new names. >> As a user I'd be +1 on that. In fact, I might even start using 'as' >> in my own code for that purpose right now. I've always felt vaguely >> confused and disturbed whenever I imported 'datetime', but until this >> discussion I didn't realize why :) Thinking about it, I know I've >> written 'from datetime import DateTime' a number of times and then had >> to go back and fix my code when I tried to run it. And I'm sure that >> sometimes when that happens I've had to (re)read the docs (or do a 'dir') >> to find out why my import wasn't working. >> >> Having said all that out loud, I think I might be stronger than a +1 on >> this idea. I'd be willing to help with doc and even code patches once >> I finish learning how to contribute properly. > > +1 from me to fix these little mishaps in naming in both modules. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com