On Fri, Aug 15, 2014 at 12:21 PM, Denis McMahon
wrote:
> Output is a sorted list of the actual times and the UTC equivalents of
> all the times in the original list. Note that I had to edit several
> strings in your times list to ensure they were all in identical format: I
> added leading 0s to nu
On 15/08/2014 19:21, Denis McMahon wrote:
On Thu, 14 Aug 2014 22:10:36 +0800, luofeiyu wrote:
I finished it ,but how to make it into more pythonic way such as min
(dates, key = converter)
1. If you don't learn to post properly, I'm going to stop trying to help
you.
I say old bean do be car
On Thu, 14 Aug 2014 22:10:36 +0800, luofeiyu wrote:
> I finished it ,but how to make it into more pythonic way such as min
> (dates, key = converter)
1. If you don't learn to post properly, I'm going to stop trying to help
you.
2. To user strptime, you need to have all the time strings in the s
Mark Lawrence :
> The rules here are quite clear, don't top post. If you can't be
> bothered to adhere to the rules, don't post.
Top-posting is bad, but I find nagging worse.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On 15/08/2014 01:56, Dan Stromberg wrote:
On Thu, Aug 14, 2014 at 5:44 PM, Mark Lawrence wrote:
I really don't understand why people here are spoon feeding you when you
still insist on top posting. Ever heard the term "manners"? Oh what a
stupid comment, obviously not.
*plonk*
Getting peop
On Thu, Aug 14, 2014 at 5:44 PM, Mark Lawrence wrote:
> I really don't understand why people here are spoon feeding you when you
> still insist on top posting. Ever heard the term "manners"? Oh what a
> stupid comment, obviously not.
>
> *plonk*
Getting people to stop top-posting is a losing ba
On 15/08/2014 00:22, luofeiyu wrote:
I really don't understand why people here are spoon feeding you when you
still insist on top posting. Ever heard the term "manners"? Oh what a
stupid comment, obviously not.
*plonk*
--
My fellow Pythonistas, ask not what our language can do for you, ask
On Thu, Aug 14, 2014 at 5:22 PM, luofeiyu wrote:
> I am glad to hear that it is no necessary to create a complicated my
> function to change the time string.
> But in my computer the timezone offset do not work for me.
> I am in win7+python34.
>
import sys
sys.version
> '3.4.0 (v3.4.0:0
I am glad to hear that it is no necessary to create a complicated my
function to change the time string.
But in my computer the timezone offset do not work for me.
I am in win7+python34.
>>> import sys
>>> sys.version
'3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit
(AMD6
On Thu, Aug 14, 2014 at 8:10 AM, luofeiyu wrote:
> I finished it ,but how to make it into more pythonic way such as
>
> min (dates, key = converter)
The converter will be your changeToUnix function, but you'll need to
rework it to convert a single, rather than the whole list.
> def changeToUnix
luofeiyu :
> y=time.strptime(time_part,"%a, %d %b %Y %H:%M:%S")
As I said, whether that works depends on your locale -- according to the
reference documentation.
In practice, I couldn't get that to fail in my tests. I would be on my
guard, though. That might mean I couldn't use strptime
On 14/08/2014 15:10, luofeiyu wrote:
How many times do you have to be asked not to top post before the
message sinks in?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-
I finished it ,but how to make it into more pythonic way such as
min (dates, key = converter)
here is my code
times=['Sat, 09 Aug 2014 07:36:46 -0700',
'Fri, 8 Aug 2014 22:25:40 -0400',
'Sat, 9 Aug 2014 12:46:43 +1000',
'Sat, 9 Aug 2014 12:50:52 +1000',
'Sat, 9 Aug 2014 02:51:01 + (UTC)',
'
In article ,
Dave Angel wrote:
> Your simplest answer is probably to write a function that converts
> a string like you have into a datetime object, say call it
> converter (). Then after testing it, you call
>
> min (dates, key = converter)
Wow, after all these years, I didn't know min() to
On 10/08/2014 08:14, luofeiyu wrote:
>>> date
['Sat, 09 Aug 2014 07:36:46 -0700', 'Fri, 8 Aug 2014 22:25:40 -0400',
'Sat, 9 Au
g 2014 12:46:43 +1000', 'Sat, 9 Aug 2014 12:50:52 +1000', 'Sat, 9 Aug
2014 02:51
:01 + (UTC)', 'Sat, 9 Aug 2014 13:03:24 +1000', 'Sat, 09 Aug 2014
13:06:28 +
1000',
>>> date
['Sat, 09 Aug 2014 07:36:46 -0700', 'Fri, 8 Aug 2014 22:25:40 -0400',
'Sat, 9 Au
g 2014 12:46:43 +1000', 'Sat, 9 Aug 2014 12:50:52 +1000', 'Sat, 9 Aug
2014 02:51
:01 + (UTC)', 'Sat, 9 Aug 2014 13:03:24 +1000', 'Sat, 09 Aug 2014
13:06:28 +
1000', 'Fri, 8 Aug 2014 20:48:44 -0700 (PDT
16 matches
Mail list logo