Python Forum
should I ... go class or stick with functions?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
should I ... go class or stick with functions?
#2
A class is an Object, or THING. A function is a list of directions. So the answer is no, you can't turn a function into a Class; however, you can make a class/object that has those functions as it's properties/methods.

So "where to store pdf files based upon the age of a project" becomes a data/file manger object.
Gribouillis likes this post
Reply


Messages In This Thread
RE: should I ... go class or stick with functions? - by michael1789 - Nov-13-2020, 07:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling functions from within a class: PYQT6 Anon_Brown 4 3,960 Dec-09-2021, 12:40 PM
Last Post: deanhystad
  Why built in functions are defined as class? quazirfan 5 2,970 Oct-23-2021, 01:20 PM
Last Post: Gribouillis
  using class functions in roguelike game trousers1 3 2,658 Dec-02-2019, 08:22 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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