def __init__()

in faker_datasets/__init__.py [0:0]


    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        # At the first instantiation, likely the only one, propagate
        # the datasets to all the decorated methods needing them.
        if hasattr(self.__class__, "__datasets__"):
            for member in self.__class__.__dict__.values():
                if hasattr(member, "set_datasets"):
                    member.set_datasets(self.__class__.__datasets__)

            # Pickers and decorated methods have a reference to the datasets of
            # their interest, let's drop all the unused others and free memory.
            del self.__class__.__datasets__