Re: Friday Finking: Limiting parameters

2020-07-22 Thread dn via Python-list
On 22/07/2020 05:37, Peter J. Holzer wrote: On 2020-07-13 17:21:40 +1200, dn via Python-list wrote: On 12/07/20 10:10 PM, Barry Scott wrote: I'd expect to see something like this: def mail_label( person, address ): first_name = person.first_name # or if you want a function interface first_line

Re: Friday Finking: Limiting parameters

2020-07-21 Thread Peter J. Holzer
On 2020-07-13 17:21:40 +1200, dn via Python-list wrote: > On 12/07/20 10:10 PM, Barry Scott wrote: > > I'd expect to see something like this: > > > > def mail_label( person, address ): > > first_name = person.first_name > > # or if you want a function interface > > first_line_of_address = address.

Re: Friday Finking: Limiting parameters

2020-07-21 Thread Peter J. Holzer
On 2020-07-12 08:56:47 +1200, DL Neil via Python-list wrote: > On 12/07/20 8:13 AM, Peter J. Holzer wrote: > > On 2020-07-11 09:54:33 +1200, dn via Python-list wrote: > > > Questions: > > > > > > Is the idea of limiting the number of parameters passed across an > > > interface > > > a real concer

Re: Friday Finking: Limiting parameters

2020-07-13 Thread Barry Scott
> On 13 Jul 2020, at 06:21, dn via Python-list wrote: > > On 12/07/20 10:10 PM, Barry Scott wrote: >>> On 12 Jul 2020, at 00:15, DL Neil via Python-list >> > wrote: >>> That does not necessarily mean that the function needs to know the particular repre

Re: Friday Finking: Limiting parameters

2020-07-12 Thread dn via Python-list
On 12/07/20 10:10 PM, Barry Scott wrote: On 12 Jul 2020, at 00:15, DL Neil via Python-list mailto:python-list@python.org>> wrote: That does not necessarily mean that the function needs to know the particular representation or form of that data.   Let those be objects with getter methods for th

Re: Friday Finking: Limiting parameters

2020-07-12 Thread Barry Scott
> On 12 Jul 2020, at 00:15, DL Neil via Python-list > wrote: > >> That does not necessarily mean that the function needs to know >> the particular representation or form of that data. Let those be >> objects with getter methods for the data you wish, and have the >> function document what m

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
On 12/07/20 9:46 AM, Christman, Roger Graydon wrote: I'll preface this by saying I am a programming instructor who still teaches from the ivory tower, so may not necessarily reflect actual practice in industry. ...in which case I will preface my response by saying that one of the virtues of th

Re: Friday Finking: Limiting parameters

2020-07-11 Thread Christman, Roger Graydon
I'll preface this by saying I am a programming instructor who still teaches from the ivory tower, so may not necessarily reflect actual practice in industry. But I have a very simple rule of thumb for limiting parameters: One should be able to summarize what a function does in one or two sentences

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
On 12/07/20 8:13 AM, Peter J. Holzer wrote: On 2020-07-11 09:54:33 +1200, dn via Python-list wrote: Questions: Is the idea of limiting the number of parameters passed across an interface a real concern or somewhat an affectation? Is three, five, seven, ... a valid limit (or warning-signal)? D

Re: Friday Finking: Limiting parameters

2020-07-11 Thread Peter J. Holzer
On 2020-07-11 09:54:33 +1200, dn via Python-list wrote: > Questions: > > Is the idea of limiting the number of parameters passed across an interface > a real concern or somewhat an affectation? > > Is three, five, seven, ... a valid limit (or warning-signal)? > > Do you have a personal or corpor

Friday Finking: Limiting parameters

2020-07-10 Thread dn via Python-list
Do you prefer to limit the number of parameters accepted by a single function/method, and if so, how do you handle situations where more data is needed? TLDR; specific questions at the end of this msg Along with one of our list-colleagues (a fellow graduate?survivor from the time of mainfram