What's the best way to minimize the need of run time checks?

breamoreboy at gmail.com breamoreboy at gmail.com
Sun Aug 14 08:46:15 EDT 2016


On Sunday, August 14, 2016 at 7:09:47 AM UTC+1, Paul Rubin wrote:
> Steven D'Aprano writes:
> > If the Python community rallies around this "record" functionality and
> > takes to it like they took too namedtuple
> 
> I like namedtuple and I think that it's a feature that they're modified
> by making a new copy.  I know that has overhead but it's palpably
> bug-avoidant.  I've used them extensively in some programs and they took
> a considerable burden off my mind compared to using something like
> structs or records.

You might find this https://glyph.twistedmatrix.com/2016/08/attrs.html an interesting read.

Kindest regards.

Mark Lawrence.



More information about the Python-list mailing list