Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OOP Code help!
#4
(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.
Reply


Messages In This Thread
OOP Code help! - by ajaY - Apr-06-2017, 02:00 PM
RE: OOP Code help! - by sparkz_alot - Apr-06-2017, 02:03 PM
RE: OOP Code help! - by nilamo - Apr-07-2017, 05:51 PM
RE: OOP Code help! - by snippsat - Apr-07-2017, 06:12 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020