Damian Yurzola added the comment:
Sorry I got my "current" wrong and I can't find the edit button
Here again:
> "How long is it until Christmas?"
# Current implementation
In [23]: datetime.datetime(2020, 12, 25) - datetime.datetime.today()
Out[23]: datetime.time
Damian Yurzola added the comment:
It took me a while to collect my thoughts but here you go.
Advanced users don't have a problem. They'll trade in date or datetime objects
explicitly. The "proof" is I could not find any github repo with more than one
start that
Damian Yurzola added the comment:
I searched all of github and there seem to be ~350K entries for datetime.today
I think this supports steven.daprano point against removal.
I could not spot any major library in a quick cursory look.
However I do see many calls that look a lot like they
Damian Yurzola added the comment:
Thanks for your prompt answer Steven.
I was inspired to file this bug after reading through a multiplicity of bugs
introduced by folks confused by the library's behavior. So there's good
precedent.
While granted, the documentation is explic
New submission from Damian Yurzola :
Last night I discovered we have datetime.datetime.today alongside
datetime.datetime.now and datetime.date.today.
- datetime.now
- date.today
Both make semantic sense.
datetime.datetime.today returns a datetime, which make no semantic sense and
causes
Change by Damian Yurzola :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue40033>
___
___
Python-bugs-list mailing list
Unsubscribe:
Damian Yurzola added the comment:
This is even a better example:
Level1A is available to inherit from, but not to type with.
Example:
from typing import List
class Level0A:
pass
class Level0B:
class Level1A:
pass
class Level1B(Level1A):
pass
class
New submission from Damian Yurzola :
In the following example the last line throws as 'NameError: name 'Level1A' is
not defined' for both 3.7 and 3.8
I assumed that Level1A should already be in scope while defining the insides of
Level1B. But it isn't.
Is th
New submission from Damian Yurzola :
'root' should be a reserved name to avoid this:
>>> import logging
>>> a = logging.getLogger()
>>> b = logging.getLogger('root')
>>> a.name
'root'
>>> b.name
'root'
>>