design question: no new attributes

Alan Isaac aisaac at american.edu
Tue Feb 27 01:40:29 EST 2007


"Ben Finney" <bignose+hates-spam at benfinney.id.au> wrote in message
news:mailman.4438.1172534289.32031.python-list at python.org...
> The Pythonic design is: don't expect to have such control over users
> of your code.

I know this is a popular response,
but the fact of the matter remains that
it can be helpful to know when someone
tries to set a value for a nonexisting attribute.
This is especially true if there have been any
interface changes.

So my question remains:
how best to trap any such attempt
subsequent to object initialization?
(I am willing to have properties for
all data attributes, if that helps.)

Thank you,
Alan Isaac





More information about the Python-list mailing list