Skip to content

Commit 65cd324

Browse files
List marshaling and py3 bug fix
* Now using `items` instead of `iteritems` for iterating over dictionaries, as the latter is not supported in Py3 * UDF arguments can be marshalled as `"list"` so that rather than arriving as tuples or tuples of tuples, they arrive as lists or lists of lists. * Now using `Application.PathSeparator` to calculate paths in the add-in, even though it shouldn't make any difference on any machine, for now.
1 parent 069c494 commit 65cd324

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

addin/xlpython.xlam

10 KB
Binary file not shown.

addin/xlpython/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def xlret(marshal=None, **kwargs):
5555
def inner(f):
5656
xlf = xlfunc(f).__xlfunc__
5757
xlr = xlf["ret"]
58-
for k, v in kwargs.iteritems():
58+
for k, v in kwargs.items():
5959
if k in xlretparams:
6060
xlr[k] = v
6161
else:
@@ -74,7 +74,7 @@ def inner(f):
7474
if arg not in xlf["argmap"]:
7575
raise Exception("Invalid argument name '" + arg + "'.")
7676
xla = xlf["argmap"][arg]
77-
for k, v in kwargs.iteritems():
77+
for k, v in kwargs.items():
7878
if k in xlargparams:
7979
xla[k] = v
8080
else:

addin/xlpython/xlpyserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def Var(self, obj, lax=False):
131131
if lax:
132132
t = type(value)
133133
if t is dict:
134-
value = tuple(value.iteritems())
134+
value = tuple(value.items())
135135
elif t.__name__ == 'ndarray' and t.__module__ == 'numpy':
136136
value = value.tolist()
137137
if type(value) is tuple:

0 commit comments

Comments
 (0)