Mercurial > pymonkey
comparison docs/rendered/_sources/pymonkey.txt @ 164:3fadba042201
Minor rewording in docs.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 30 Aug 2009 17:07:38 -0700 |
parents | 4edaa0e6f382 |
children | b745c9d8eef9 |
comparison
equal
deleted
inserted
replaced
163:4edaa0e6f382 | 164:3fadba042201 |
---|---|
44 >>> obj = pymonkey.Runtime().new_context().new_object() | 44 >>> obj = pymonkey.Runtime().new_context().new_object() |
45 >>> isinstance(obj, pymonkey.Object) | 45 >>> isinstance(obj, pymonkey.Object) |
46 True | 46 True |
47 | 47 |
48 Note that :class:`Object` and all its subclasses are | 48 Note that :class:`Object` and all its subclasses are |
49 identity-preserving when passed between Python-land and | 49 identity-preserving when passed between Python and |
50 JS-land. For instance: | 50 JavaScript code. For instance: |
51 | 51 |
52 >>> cx = pymonkey.Runtime().new_context() | 52 >>> cx = pymonkey.Runtime().new_context() |
53 >>> obj1 = cx.new_object() | 53 >>> obj1 = cx.new_object() |
54 >>> obj2 = cx.evaluate_script(obj1, 'this', '<string>', 1) | 54 >>> obj2 = cx.evaluate_script(obj1, 'this', '<string>', 1) |
55 >>> obj1 is obj2 | 55 >>> obj1 is obj2 |