datetime.datetime. or datetime. ?
Diez B. Roggisch
deets at nospam.web.de
Thu Oct 8 23:25:07 CEST 2009
> Hello, my basic question is which recommendation is after slight
> restructuring datetime.datetime to datetime
> Both works but only one should be chosen probably adjust my package to
> comply to dependencies.
> Spec integrated code where datetime.datetime.now() refactored to
> set rather
> from datetime import datetime, timedelta
> import datetime
> or no matter and completely flexible (then why gae error that
> datetime.datetime wasn't datetime?)
> Naturally better not to customize external dependencies but seemingly
> impossible to use both for a little xmpp project.
> Thanks with best regards
- whitespace is significant. In python. And in posting here.
- please show us the exact traceback you get, and a minimal example
that produces it.
- how to import is mostly a matter of taste, as long as you refrain
from using "from datetime import *"e
More information about the Python-list