[Tutor] Function Programming Style

Kai Weber lists@glorybox.de
Mon Jun 30 13:26:03 2003


* Alan Trautman <ATrautman@perryjudds.com>:

> In addition, if you combine all of your set functions into on gigantic
> function it will be much harder to debug and/or add features.

After reading your message serveral times: do you recommend smaller
set/get functions or not? Maybe my initial mail lacked some
informations.

I know Python does not need get/set but this is a common way of
accessing variables even if they "private", isn't it?

I am writing a GUI application which sets some meta informations on
files. There is a class for the information and one for the GUI. The
GUI just calls fileinfo.set_date(), fileinfo.set_url() and so on.

I now believe, this is the way to go: small, simple functions to
fullfill the KISS paradigm.
 
Kai
-- 
* mail kai.weber@glorybox.de
  web http://www.glorybox.de
  pgp 0x594D4132