[Python-Dev] Curious datetime method (original) (raw)
Anders Sandvig anders.sandvig at gmail.com
Wed Jul 21 13:03:20 CEST 2010
- Previous message: [Python-Dev] Curious datetime method
- Next message: [Python-Dev] A suggestion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Jul 20, 2010 at 5:56 PM, Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:
In the real world where we have to take backward compatibility into account, I would like to make today() and now() to be the same: both taking optional tz argument, both available as either date or datetime methods and both covariant. the justification for having two methods doing exactly the same will be just readability: date.today() and datetime.now() are more readable than date.now() and datetime.today().
I agree. Unless, of course, someone has a good explanation/reason for why today() and now() are implemented differently (i.e. a use case where the difference is significant).
Anders
- Previous message: [Python-Dev] Curious datetime method
- Next message: [Python-Dev] A suggestion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]