> On 14 Nov 2022, at 22:49, Chris Angelico <ros...@gmail.com> wrote:
> 
> On Tue, 15 Nov 2022 at 09:38, Barry <ba...@barrys-emacs.org> wrote:
>> 
>> 
>> 
>>>> On 14 Nov 2022, at 22:06, Thomas Passin <li...@tompassin.net> wrote:
>>> 
>>> For parameter passing like your #2, I have packaged them into a dictionary 
>>> and passed that around.  It was easy enough, and worked well.
>>> 
>> I used to use a dict but having been burnt with issues now create a class.
>> 
>> With a class you can add accessor methods that allow you to run debug code 
>> as values are changed. Also you can check that values being set are spelt 
>> correctly, have reasonable values etc.
>> 
> 
> TBH you could add accessor methods to a dict just as easily

Its the dict interface that we found allowed for API abuse and lead to hard to 
fix bugs.

Barry

> 
> ChrisA
> -- 
> https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to