summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/py.js/doc
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-12-03 12:47:06 +0100
committerXavier Morel <xmo@openerp.com>2012-12-03 12:47:06 +0100
commit54ea7670d36d84d47d52ede3f1d1a1c847141bc5 (patch)
treed34a46093673d758fc20c11269564814e7b71cca /addons/web/static/lib/py.js/doc
parent96cd88b04c086bc829f039af5c28569af26ce550 (diff)
[FIX] incorrect conversion of JS arrays to py.js lists/tuples
bzr revid: xmo@openerp.com-20121203114706-dn5sqq3glqst4g1q
Diffstat (limited to 'addons/web/static/lib/py.js/doc')
-rw-r--r--addons/web/static/lib/py.js/doc/utility.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/addons/web/static/lib/py.js/doc/utility.rst b/addons/web/static/lib/py.js/doc/utility.rst
index 86cfb1cfe36..8bb9164885f 100644
--- a/addons/web/static/lib/py.js/doc/utility.rst
+++ b/addons/web/static/lib/py.js/doc/utility.rst
@@ -161,6 +161,28 @@ Object Protocol
:returns: ``Number``
:raises: ``TypeError`` if the object doesn't have a length
+.. function:: py.PY_getItem(o, key)
+
+ Returns the element of ``o`` corresponding to the object
+ ``key``. This is equivalent to ``o[key]``.
+
+ :param o: :class:`py.object`
+ :param key: :class:`py.object`
+ :returns: :class:`py.object`
+ :raises: ``TypeError`` if ``o`` does not support the operation, if
+ ``key`` or the return value is not a :class:`py.object`
+
+.. function:: py.PY_setItem(o, key, v)
+
+ Maps the object ``key`` to the value ``v`` in ``o``. Equivalent to
+ ``o[key] = v``.
+
+ :param o: :class:`py.object`
+ :param key: :class:`py.object`
+ :param v: :class:`py.object`
+ :raises: ``TypeError`` if ``o`` does not support the operation, or
+ if ``key`` or ``v`` are not :class:`py.object`
+
Number Protocol
---------------