Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Commit

Permalink
python-bond 1.3 release notes and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wavexx committed Sep 12, 2014
1 parent 8ae7d9a commit 170c0b0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
8 changes: 8 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
python-bond 1.3
---------------

* Added support for "Quoted expressions". ``call()`` can now be used on remote
functions expecting one or more remote unserializable objects as their
arguments, without the need of a support function and/or ``eval()``.


python-bond 1.2
---------------

Expand Down
22 changes: 21 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,30 @@ such as file descriptors, without the use of a support function and/or eval:
.. code:: python3
pl = make_bond('Perl')
pl.eval_block('open($fd, "<file.txt");')
pl.eval_block('open($fd, ">file.txt");')
fd = pl.ref('$fd')
pl.call('syswrite', fd, "Hello world!")
pl.call('close', fd)
Since ``ref()`` objects cannot be nested, there are still cases where it might
be necessary to use a support function. To demonstrate, we rewrite the above
example without quoted expressions, while still allowing an argument ("Hello
world!") to be local:

.. code:: python3
pl = make_bond('Perl')
pl.eval_block('open($fd, ">file.txt");')
pl.eval_block('sub syswrite_fd { syswrite($fd, shift()); };')
pl.call('syswrite_fd', "Hello world!")
pl.eval('close($fd)')
Or more succinctly:

.. code:: python3
pl.call('sub { syswrite($fd, shift()); }', "Hello world!")
Language support
================
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+ '\n'.join(news.split('\n\n\n', 1)[0].splitlines()[2:]))

# the actual setup
setup(name='python-bond', version='1.2',
setup(name='python-bond', version='1.3',
description='transparent remote/recursive evaluation between Python and other languages',

author="Yuri D'Elia",
Expand Down

0 comments on commit 170c0b0

Please sign in to comment.