the Gravity of Python 2
Chris Angelico
rosuav at gmail.com
Wed Jan 8 23:38:19 EST 2014
On Thu, Jan 9, 2014 at 3:29 PM, Roy Smith <roy at panix.com> wrote:
> So, I'd like to see your code which generates an aware UTC datetime
> object in Python. And then we can argue about whether it's simple or
> not :-)
In fact, I'll go further. Why do you need a datetime object at all?
What is it that you need? Arithmetic can be done with int and/or
float, parsing and formatting can be done with time.str[pf]time, etc,
etc. It's like if someone asks "How can I build a regular expression
that will tell me if a string is valid JSON?". The question poses a
restriction that may be unnecessary, and may eliminate all possible
answers.
ChrisA
More information about the Python-list
mailing list