Skip to content

Use less dictionary object and create more classes #26

@rjodon

Description

@rjodon

I can see everywhere this object components = {'x': x, 'y': y, 'z': z, 'xx': xx, 'yy': yy, 'zz': zz}
I would rather create a component like this:

class Components:
    def __init__(x=0. y=0, z=0, xx=0, yy=0, zz=0):
        self.x = x
        self.y = y 
        etc... 

after it's much easier to access the individual components self.components.x is much lighter than self.components['x'] also we can add plenty of helpers inside the components class

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions