Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use defs instead of classes
#1
Hi all ! Since it is easier to use defs instead of classes, is it not reasonable to use classes only in case there are more than 1 classes ??
Reply
#2
Yes I watched a youtube video where a developer advocated that if a class has only one method, it should be a function instead of a class. These are somewhat precious concerns, and I don't quite agree with that.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using classes? Can I just use classes to structure code? muteboy 5 5,035 Nov-01-2017, 04:20 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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