R. David Murray <[email protected]> added the comment:

I actually agree with Anatoly here.  I find it much more intuitive to do

  import datetime

   timestamp = datetime.now()

than to do 

   timestamp = datetime.datetime.now()

I always have to remember that 'now' is a class method, often after getting a 
"datetime module has no attribute 'now'" message.  In most standard library 
modules a function like that would be, well, a function.  I can't imagine code 
where I'd find it more convenient to get 'now' from the class, and if I saw 
code like

    timestamp = othertimestamp.now()

I'd run screaming.

Personally I think the class methods would be better off deprecated in favor of 
module level functions.

However, all that said, the datetime API is what it is, and I'm not sure it is 
worth going through a deprecation cycle for this.  (Though othertimestamp.now() 
really does give me the heebie jeebies.)

----------
nosy: +r.david.murray
status: pending -> open

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to