Hey There is also a performance gain when accessing / initializing the Object, see example. Hope that answers your question
import timeit print(timeit.timeit("p3 = SmallObject('Jerome', 'K')", "from __main__ import SmallObject")) # Output: 0.13634319999982836 print(timeit.timeit("p3 = BiggerObject('Jerome', 'K')", "from __main__ import BiggerObject")) # Output: 0.166356599998835
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey
There is also a performance gain when accessing / initializing the Object, see example. Hope that answers your question