On Thu, Mar 14, 2013 at 6:21 PM, Terry Reedy wrote:
> I believe everything in the doc should be in __all__. Open an issue on the
> tracker and add terry.reedy as nosy.
> Note on the issue that timeit.default_timer is not callable, contrary to the
> doc (which should also be fixed).
Thanks! Issue
On 3/14/2013 2:58 AM, Chris Angelico wrote:
While putting together some timing stats for the latest Python 3.3
string representation thread, I ran into an oddity in how IDLE handles
timeit. The normal way to profile Python code, according to stuff I've
found on the internet, is timeit.timeit:
i
Karl Chen wrote:
>
> I wanted to time something that uses with_statement, in python2.5.
> Importing __future__ in the statement or the setup doesn't work
> since it's not the beginning of the code being compiled. Other
> than using a separate module, I could only come up with this:
>
> time
On Wed, 18 Feb 2009 17:35:16 -0800, cokofreedom wrote:
> I am really stuck trying to work out how to pass variables to timeit to
> allow me to run any of the examples...
setup = "from __main__ import example1, example2, example3"
Timer("example1()", setup)
In Python 2.6 you can also pass functi
3c273 wrote:
> "John Machin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> You appear to know what a switch is. I'm therefore surprised that you
>> appear not to
>> know that the convention is that any program that uses
>> command-line switches should do something informative whe
"3c273" wrote:
> Doh! Me thinks Windows at work "python /?" (No good!)
that was supposed to be fixed in 2.5, but it doesn't seem to have made it into
beta 2. hmm.
--
http://mail.python.org/mailman/listinfo/python-list
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You appear to know what a switch is. I'm therefore surprised that you
> appear not to
> know that the convention is that any program that uses
> command-line switches should do something informative when run with a -h
> sw
On 12/07/2006 6:35 AM, 3c273 wrote:
> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()"
>> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()"
>>
>> note that timeit runs the benchmarked
On 12/07/2006 1:33 AM, Phoe6 wrote:
> Hi,
Hi,
I'm a little astonished that anyone would worry too much (if at all!)
about how long it took to read a config file. Generally, one would
concentrate on correctness, and legibility of source code. There's not
much point IMHO in timing your pyConfig
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()"
> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()"
>
> note that timeit runs the benchmarked function multiple times, so you may
want
> to
"Phoe6"
>> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()"
>> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()"
>
>> note that timeit runs the benchmarked function multiple times, so you may
>> want
>> to remove the print statements.
>
> Thanks a lot Fredrik!. I di
Fredrik Lundh wrote:
>
> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()"
> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()"
> note that timeit runs the benchmarked function multiple times, so you may want
> to remove the print statements.
Thanks a lot Fredrik!. I
"Phoe6" <[EMAIL PROTECTED]> wrote:
> How do I compare the performance of pyConfig.py vs pyConparse.py using
> timeit module?
$ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()"
$ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()"
note that timeit runs the benchmarked fun
Peter Otten <[EMAIL PROTECTED]> writes:
> Steven D'Aprano wrote:
>
>> When using the timeit module, you pass the code you
>> want to time as strings:
...
>> This is all very well, but it feels quite unnatural to
>> me. Why am I passing strings around when functions are
>> first class objects? Have
Steven D'Aprano wrote:
> When using the timeit module, you pass the code you
> want to time as strings:
>
> import timeit
> t = timeit.Timer("foo(x, y)", \
> """from module import foo
> x = 27
> y = 45
> """)
> elapsed_time = t.timeit()
>
> This is all very well, but it feels quite unnatural to
15 matches
Mail list logo