RE: Question on periods in strings

2009-03-12 Thread Philip Bloom
on periods in strings En Wed, 11 Mar 2009 23:42:45 -0200, Philip Bloom escribió: > Thanks for the welcome :) > > You're right. Here's with the missed line (I was cutting out commented > parts). Hopefully these are all cut/paste-able. > > #test A > #runs

Re: Question on periods in strings

2009-03-12 Thread skip
Gabriel> I could not reproduce this. Nor can I. I didn't see the original post. What were the hardware parameters and Python version? -- Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on periods in strings

2009-03-12 Thread Bruno Desthuilliers
Philip Bloom a écrit : (snip) from datetime import datetime startTime = datetime.now() (snip) print (datetime.now() - startTime) A bit OT, but you may want to use timeit.Timer for this kind of microbenchmarks. (snip) -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on periods in strings

2009-03-12 Thread John Machin
On Mar 12, 12:42 pm, "Philip Bloom" wrote: > The range is not actually a meaningful adjustment as the time results are > identical switching out xrange (as I believe they should be since in 2.6 > range maps to xrange for the most part according to some of the docs).   Please do import sys;

Re: Question on periods in strings

2009-03-12 Thread Gabriel Genellina
En Wed, 11 Mar 2009 23:42:45 -0200, Philip Bloom escribió: Thanks for the welcome :) You're right. Here's with the missed line (I was cutting out commented parts). Hopefully these are all cut/paste-able. #test A #runs in 5.8 seconds. from datetime import datetime testvar2='9a00' startT

Re: Question on periods in strings

2009-03-11 Thread John Yeung
On Mar 11, 9:42 pm, "Philip Bloom" wrote: > #test A > #runs in 5.8 seconds. > from datetime import datetime > testvar2='9a00' > startTime = datetime.now() > filehandle=open('testwriting.txt','w') > for var in range(1000): >     filehandle.write(testvar2) > filehandle.close() > print (datetime.

RE: Question on periods in strings

2009-03-11 Thread Philip Bloom
entionally small python code since it originated from just seeing what some variations on file writes might differ in scaling. -Original Message- From: python-list-bounces+pbloom=crystald@python.org [mailto:python-list-bounces+pbloom=crystald@python.org] On Behalf Of Gabriel Ge

Re: Question on periods in strings

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 22:35:22 -0200, Philip Bloom escribió: Hello, this is my first time posting to the list, but my curiosity here is great. Welcome! I was randomly toying with file writes and I ran into something that seemed quite odd to me. When a period is in a string, file write take