What exactly label_from_func function does (lesson3). Why it changes other instance variable

Well, I found it… sorry for asking a stupid question- just in case somebody was as blind as me:
self.x in this case actually isn’t existing at all. The reason it is printed lies in the getattr method- the same one I’ve seen this strange occurrence. While calling self.x x is not present in ItemLists class and ft = getattr(self.train, k) is called, thus printing actually self.train.x.

Fell free to delete this topic if none needs it.

1 Like