Skip to content

Commit 497da44

Browse files
author
Dorian Birraux
committed
Merge pull request #216 in LCL/wolframclientforpython from docs/fix-serialization to master
* commit 'a36eec8c29888dbccb4e3d11081ee3b881a1e06d': minor update repr of controller minor doc fix clarified conversion of classes with iter method
2 parents 9ac4285 + a36eec8 commit 497da44

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/docpages/public_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ Example::
7979
>>> export({"list": [1, 2, 3], "set": set([1, 2, 2, 4]), "frozenset": frozenset([1, 2, 2, 4]), "dict": dict(a = 2)})
8080
'<|"list" -> {1, 2, 3}, "set" -> {1, 2, 4}, "frozenset" -> {1, 2, 4}, "dict" -> <|"a" -> 2|>|>'
8181

82-
Any class that has an `__iter__` method is converted to a Wolfram Language :wl:`List`::
82+
If no converter is defined for a class that has an `__iter__` method, it is converted to a Wolfram Language :wl:`List`::
8383

8484
>>> export((i + 2 for i in range(10)))
85-
'"{2, 3, 4, 5, 6, 7, 8, 9, 10, 11}"'
85+
'{2, 3, 4, 5, 6, 7, 8, 9, 10, 11}'
8686

8787
Python generators are also serialized as :wl:`List`::
8888

wolframclient/evaluation/kernel/kernelcontroller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def _cancel_tasks(self):
592592

593593
def __repr__(self):
594594
if self.started:
595-
return '<%s[%s🔵], "%s", pid:%i, kernel sockets: (in:%s, out:%s)>'\
595+
return '<%s[%s], "%s", pid:%i, kernel sockets: (in:%s, out:%s)>'\
596596
% (
597597
self.__class__.__name__,
598598
self.name,
@@ -602,7 +602,7 @@ def __repr__(self):
602602
self.kernel_socket_out.uri,
603603
)
604604
else:
605-
return '<%s[%s🔴], "%s">' % (self.__class__.__name__, self.name, self.kernel)
605+
return '<%s[%s], "%s">' % (self.__class__.__name__, self.name, self.kernel)
606606

607607

608608
class _StartEvent(object):

0 commit comments

Comments
 (0)