Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
colpage.py
#10
(Apr-30-2017, 04:42 AM)Mekire Wrote: Though I think changes should still be made to make attributes clearer and there is no need to use that function to both set and get these attributes.  As a C programmer I would think you would hate a function with an unpredictable return type.
even in C i have made functions that set things and return the previous value for years.  and then in cases where there is nothing being set, it just gets the current setting.  so it's a get and set in one.  i have been doing duck typing, even in C. i called it context typing.

i've seen the get/set combining in other source code, too.  i've even seen cases where there being no way to not set a value, the caller set some value just to get the current value, then called again with what was returned to set it back.  i think it was from my IBM mainframe assembler days.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
colpage.py - by Skaperen - Apr-29-2017, 06:12 AM
RE: colpage.py - by volcano63 - Apr-29-2017, 09:04 AM
RE: colpage.py - by nilamo - Apr-29-2017, 04:57 PM
RE: colpage.py - by Skaperen - Apr-30-2017, 02:41 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 04:10 AM
RE: colpage.py - by nilamo - Apr-30-2017, 04:31 AM
RE: colpage.py - by Mekire - Apr-30-2017, 04:42 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 05:24 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 05:10 AM
RE: colpage.py - by Mekire - Apr-30-2017, 05:14 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 05:36 AM
RE: colpage.py - by Mekire - Apr-30-2017, 05:28 AM
RE: colpage.py - by Skaperen - May-02-2017, 04:31 AM
RE: colpage.py - by Mekire - Apr-30-2017, 05:46 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 06:15 AM
RE: colpage.py - by Mekire - Apr-30-2017, 07:17 AM
RE: colpage.py - by Skaperen - Apr-30-2017, 09:42 AM
RE: colpage.py - by volcano63 - May-01-2017, 05:00 PM
RE: colpage.py - by Mekire - May-01-2017, 10:39 PM
RE: colpage.py - by volcano63 - May-01-2017, 10:47 PM

Forum Jump:

User Panel Messages

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