E&S CVS Commit: PEAK - Added keyword argument validation for component __init__. You now can only

pje at eby-sarna.com pje at eby-sarna.com
Mon Dec 2 16:57:00 EST 2002


Module Name:	PEAK
Committed By:	pje
Date:		Mon Dec  2 21:56:30 UTC 2002

Modified Files:
	PEAK/src/peak/binding: components.py

Log Message:
Added keyword argument validation for component __init__.  You now can only
supply keyword arguments to a component constructor when the class has an
attribute of the appropriate name.  This should help avoid misspellings of
keyword arguments.  It should really use more specific criteria, like
which attributes are actual descriptors with __set__ methods.  That could
help distinguish between class and instance attributes.  But before we do
that, we'd need to rethink 'binding.Constant()' and make it required to
define class-level default values for attributes, instead of just putting
the value directly in the class.  It's worth thinking about.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/binding/components.py.diff?r1=1.73&r2=1.74

To generate a diff of this commit:
cvs rdiff -r1.73 -r1.74 PEAK/src/peak/binding/components.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list