Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Attributes
#3
(Nov-02-2018, 02:33 PM)ichabod801 Wrote: It's not something you generally worry about in Python. Underscores can be used, but they are just a hint to other programmers that it's something internal to the class. If there are real security concerns, as in when self.x is changed self.y must also be changed or things crash, look into properties.

Thank you for the response. I did read a fair bit about properties as well, but it wasn't immediately clear at the time how often and under what circumstances they should be used. Your mention of using it to manage attribute dependencies is a good one and makes a lot of sense.
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,939 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,797 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