Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:
> There's no way to be sure. But if you have a public (i.e. > non-underscore-prfixed) attribute then some percentage of people are going to > set it, particularly if it seems to work. Well, reading it isn't problematic, so there's no leading underscore. (The setXXX() code in logging predates Python 2 and properties). > The code doesn't look wrong, so mistakes are going to happen. That's true for lots of code. Sure, mistakes will happen, and that's the price paid when one doesn't follow documentation. It feels wrong to do this as a band-aid to help out people who didn't do the right thing. > but the good news is that the values are now cached That's not relevant to the performance numbers I posted above, is it? In that code snippet, that's a single constant value (0) that's being returned either via an attribute, or via a property. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37857> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com