Apr-07-2017, 06:12 PM
(Apr-07-2017, 05:51 PM)nilamo Wrote: Why are there setters and getters? This is python, not a shitty language full of duplicate code.It's annoying and unfortunately a common thing.
People that are coming from from Java/C++,
and think Python OOP work in the same way.
MIT(has Python as main language did use Java before) teach this:
Quote:is strongly advice to always use getters and setters and not access data attribute directly.Had a post about here.