Permalink
Browse files

Readme fix.

  • Loading branch information...
1 parent aab848f commit b1533052d0ddaebe8e033e96f2552e4c2a7aaf6a @kennethreitz kennethreitz committed Sep 6, 2010
Showing with 35 additions and 35 deletions.
  1. +35 −35 README.rst
View
@@ -23,58 +23,58 @@ Usage
Print passed-in arguments and function calls. ::
- @showme.trace
- def complex_function(a, b, c, **kwargs):
- ...
-
-
- >>> complex_function('alpha', 'beta', False, debug=True)
- calling haystack.submodule.complex_function with
- args: ({'a': 'alpha', 'b': 'beta', 'c': False},)
- kwargs: {'debug': True}
+ @showme.trace
+ def complex_function(a, b, c, **kwargs):
+ ...
+
+
+ >>> complex_function('alpha', 'beta', False, debug=True)
+ calling haystack.submodule.complex_function with
+ args: ({'a': 'alpha', 'b': 'beta', 'c': False},)
+ kwargs: {'debug': True}
Print function execution time. ::
- @showme.cputime
- def some_function(a):
- ...
-
- >>> some_function()
- Execution speed of __main__.some_function:
- 0.000688076019287 seconds
-
+ @showme.cputime
+ def some_function(a):
+ ...
+
+ >>> some_function()
+ Execution speed of __main__.some_function:
+ 0.000688076019287 seconds
+
Print function cpu-execution time. ::
@showme.cputime
def complex_function(a, b, c):
- ...
+ ...
- >>> complex_function
- CPU time for __main__.complex_function:
+ >>> complex_function()
+ CPU time for __main__.complex_function:
3 function calls in 0.013 CPU seconds
-
+
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.013 0.013 0.013 0.013 test_time.py:6(test)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 {range}
.. Print local variables available at runtime. ::
-..
-.. @showme.locals
-.. def complex_function(a, b, c):
-.. ...
+..
+.. @showme.locals
+.. def complex_function(a, b, c):
+.. ...
Pretty print function documentation. ::
-
- @showme.docs
- def complex_function():
- """Example Documentation for complex_function."""
- ...
-
- >>> complex_function()
- Documentation for __main__.complex_function:
- Example Documentation for complex_function.
-
+
+ @showme.docs
+ def complex_function():
+ """Example Documentation for complex_function."""
+ ...
+
+ >>> complex_function()
+ Documentation for __main__.complex_function:
+ Example Documentation for complex_function.
+

0 comments on commit b153305

Please sign in to comment.