Object constructor returns a object with less attributes than expected

Viewed 26

Im doing a program that generates a XML file using the element tree library, in my xml file i need a tag named Station with two subtags called Property and ProductionLine, so i made this class for it

from .Property import Property
from .ProductionLine import ProductionLine

class Station:
    productionLine: ProductionLine
    property: Property

    def __init__(self, property: Property, productionLine: ProductionLine) -> None:
        self.property = property
        self.productionLine: productionLine

but, when i create a object from this class, aparently it only has the "property" attribute

property = Property(properties)
productionLineElement = ProductionLine(production_line)

station = Station(property, productionLineElement)

i checked it with print(station.__dict__) and this is what returns

{'property': <xmlgenerator.objects.Property.Property object at 0x7fb00dc5a910>}

Any idea of why only the "property" attribute its being shown? Any help would be apreciated

0 Answers
Related