Vizard 8 » Command Index » Vizard modules » viz » <viz>.Data
8.0

<viz>.Data

Creates an object to store related data

<viz>.Data(  
**kw  
)  
**kw
Keyword arguments can be used to specify attributes during creation.

Remarks

The elements stored in the object do not need to be of the same data type. This is similar to the concept of a structure in C.

Return Value

viz.Data object

Example

#Create the data object
student = viz.Data()

#Add various elements to it
student.name = 'Jenny'
student.id = 1234
student.score = 95

print("The student named %s had a score of %d." % (student.name, student.score))


#Pass in elements as arguments when creating the oject
student = viz.Data(name='Jenny',id=1234,score=95)