Genba_Kantoku_s Posted April 26, 2023 Share Posted April 26, 2023 (edited) I'm just curious where the "@xvm.export" function (the one which makes a function to be callable by {{}} macro in xvm config) is defined and governed. I only found class XvmNamespace from xvm_pymacro/__init__.py , in which a function export() is defined, but to use the @xvm.export function I really don't need to import xvm_pymacro XvmNamespace . And I can't figure out why. I think I listed all the relevant source code folders to my VSCode workspace, but still, the VSCode cannot find where the @xvm.export is defined. But they are still all working normally. (I know the pylance of VSCode makes many false errors in XVM development because of various reasons, including the difference between Python 2.7 and Python 3.11, just curious) Edited April 26, 2023 by Genba_Kantoku_s @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted April 26, 2023 Share Posted April 26, 2023 15 часов назад, Genba_Kantoku_s сказал: but to use the @xvm.export function I really don't need to import xvm_pymacro XvmNamespace . And I can't figure out why. https://gitlab.com/xvm/xvm/-/blob/master/src/python/xvm_pymacro/__init__.py#L101 @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted April 27, 2023 Author Share Posted April 27, 2023 8 hours ago, ktulho said: https://gitlab.com/xvm/xvm/-/blob/master/src/python/xvm_pymacro/__init__.py#L101 Thank you for teaching me the knowledge! This kind of __execute is totally a new idea to me! @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.