polyspace.project.Global Class
R2026bNamespace: polyspace.project
(Python) Store information about a global variable in parsed source code
Since R2025a
Description
This Python® class contains information about a global variable in your source code. A polyspace.project.Global object stores the variable name and support information for stubbing.
You obtain polyspace.project.Global objects from the Globals property of a polyspace.project.CodeInfo object, or by using the getGlobalByName method.
Creation
Description
globalList = codeInfo.Globals returns a list of polyspace.project.Global objects for all the global variables in the parsed source code. Here, codeInfo is a polyspace.project.CodeInfo object.
globalVar = codeInfo.getGlobalByName( returns the name)polyspace.project.Global object for the global variable with the specified name. The global variable name must be qualified with the namespace.