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
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
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
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;
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
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.
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
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