Macro selector failing to find python macros

The macro selector dialog in the tools menu is failing to spot macros in python code when there is a global tuple assignment (A, B = 1, 2 for example). The macros will run (via keyboard shortcut made before offending assignment put in module) so the script provider find the macros, and converting the tuple assignment to two normal assignments unblinds the macro selector dialog.
Anyone else come across this behaviour? (tested in Calc only)

The full code that causes problems is

A, B = 1, 2
def myFunc():
    c = 1
g_exportedScripts = myFunc,

Commenting out the tuple assignment makes the function visible. It is always callable.

yes, I can reproduce the issue, actually I dont know why it doesnt work…

I’ve submitted bug 92007 please confirm!

From my slightly long experience with python:
The common Case for ǹot showing some modules Content are trivial Syntax-Errors like missing closing braces|brackets|curly_braces or a missing : at the end of class|def|if|while|try|... lines.

After reproducing the issue I did some debugging, here’s the patch for:

--- /opt/libreoffice4.4/program/pythonscript.py	 #old
+++ /opt/libreoffice4.4/program/pythonscript.py   #new
@@ -403,7 +403,12 @@
                 allFuncs.append(node.name)
             elif isinstance(node, ast.Assign):
                 for target in node.targets:
-                    if target.id == "g_exportedScripts":
+                    try:
+                        identifier = target.id
+                    except AttributeError:
+                        identifier = ""
+                        pass
+                    if identifier == "g_exportedScripts":
                         for value in node.value.elts:
                             g_exportedScripts.append(value.id)
                         return g_exportedScripts

To be sure most of the time that is the case with me. But not this time as I get the behaviour where the only other content in the module is a function with the one line ‘c=1’. The macro runs - used a three line ‘hello world’ function to be sure.

so - please post the whole content, to give others a chance to reproduce the issue.