Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Attributes
#5
(Nov-02-2018, 02:57 PM)Gribouillis Wrote: From the point of view of OOP design, I'd say that there is a design problem if a class has too many attributes. It means that some of these attributes could be grouped together and form subojects aggregated to the initial object.

OOP is not one of my strong suits yet, and your response reminded me that I would like to address that as well. Is there a Python structure that is well suited to grouping attributes together? In my current code, I have a bunch of wx.StaticText, wx.TextCtrl, and sizers, among a few other widgets. I have yet to identify a design pattern (MVC, MVP, etc.) to follow which I realize is pretty important as the application grows larger. That said, can I group these widgets outside of a to-be-selected design pattern, or would the pattern itself achieve that in a more cohesive manner?
Reply


Messages In This Thread
Python Attributes - by CanadaGuy - Nov-02-2018, 02:15 PM
RE: Python Attributes - by ichabod801 - Nov-02-2018, 02:33 PM
RE: Python Attributes - by CanadaGuy - Nov-02-2018, 02:41 PM
RE: Python Attributes - by Gribouillis - Nov-02-2018, 02:57 PM
RE: Python Attributes - by CanadaGuy - Nov-02-2018, 03:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python the regex not getting any attributes sarath_unrelax 1 1,869 Dec-19-2019, 11:06 AM
Last Post: Larz60+
  Python QGIS tool that replaces layout text labels with attributes from an input table geodenn92 1 2,700 Aug-13-2019, 06:05 AM
Last Post: buran

Forum Jump:

User Panel Messages

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