[pypy-svn] r36710 - pypy/dist/pypy/doc/js
fijal at codespeak.net
fijal at codespeak.net
Sun Jan 14 00:32:07 CET 2007
Author: fijal
Date: Sun Jan 14 00:32:05 2007
New Revision: 36710
Modified:
pypy/dist/pypy/doc/js/todo.txt
pypy/dist/pypy/doc/js/using.txt
Log:
Update documents
Modified: pypy/dist/pypy/doc/js/todo.txt
==============================================================================
--- pypy/dist/pypy/doc/js/todo.txt (original)
+++ pypy/dist/pypy/doc/js/todo.txt Sun Jan 14 00:32:05 2007
@@ -5,8 +5,6 @@
* Make a tutorial somewhat usable
-* External function interface should be refined
-
* Optimizations
- names usage
@@ -15,4 +13,4 @@
- unnecessary jumps
-* Provide some high level widgets-like functionality
\ No newline at end of file
+* Provide some high level widgets-like functionality
Modified: pypy/dist/pypy/doc/js/using.txt
==============================================================================
--- pypy/dist/pypy/doc/js/using.txt (original)
+++ pypy/dist/pypy/doc/js/using.txt Sun Jan 14 00:32:05 2007
@@ -94,16 +94,15 @@
tell the JS backend to render it using xmlhttp communication. Because
the web server code does not need to be rpython, you have to supply some
way of telling PyPy what types can be returned out of it. This is done
-using the decorator `@described(retval = <example of used type>)` from
+using the decorator `@described(retval = <used type>)` from
`bltregistry`_. For example you may provide::
- @described(retval = {'a':'a'})
+ @described(retval = {str:str})
def some_fun(self, some_arg = 3):
....
to tell compiler that this function will return mapping from string to
-string and will take integer as an argument (note that 'a' and 3 are not
-special values, just examples of the type). You can simply specify the
+string and will take integer as an argument. You can simply specify the
arguments using keyword arguments with an example, or pass an args
dictionary to the described decorator.
@@ -127,7 +126,7 @@
class PingHandler(BasicExternal):
_render_xmlhttp = True
- @described(retval={"aa":"aa"})
+ @described(retval={str:str})
def ping(self, ping_str="aa"):
return dict(response="PONG: %s" % ping_str)
More information about the Pypy-commit
mailing list