I'd prefer a frozen dataclass with an explicit replace method
On Sat, 26 Jun 2021, 21:56 Marc-Andre Lemburg, email@example.com wrote:
On 26.06.2021 21:32, Ethan Furman wrote:
On 6/25/21 5:20 PM, Eric V. Smith wrote:
It seems like many of the suggestions are SSLContext specific. I don't
we should be adding
__slots__ or otherwise redefining the interface to that object. Isn't
general "problem" in
In most cases I would agree with you, but in this case the object is
sensitive, and security should be much more rigorous in ensuring
Isn't this more an issue of API design rather than Python's flexibility when it comes to defining attributes ?
IMO, a security relevant API should not use direct attribute access for adjusting important parameters. Those should always be done using functions or method calls which apply extra sanity checks and highlight issues in form of exceptions.
And those are possible in Python without calling type checking, linters or other extra tools to the rescue.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Experts (#1, Jun 26 2021)
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/
Python-ideas mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://firstname.lastname@example.org/message/53V2RC... Code of Conduct: http://python.org/psf/codeofconduct/