E&S CVS Commit: PEAK - 'naming.IBasicContext.lookup()' and 'naming.lookup()' now accept a 'default'

pje at eby-sarna.com pje at eby-sarna.com
Mon Sep 1 09:31:00 EDT 2003


Module Name:	PEAK
Committed By:	pje
Date:		Sun Aug 31 00:23:04 UTC 2003

Modified Files:
	PEAK: CHANGES.txt TODO.txt
	PEAK/src/peak/binding: components.py interfaces.py
	PEAK/src/peak/naming: api.py contexts.py interfaces.py names.py
	PEAK/src/peak/running: commands.py

Log Message:
'naming.IBasicContext.lookup()' and 'naming.lookup()' now accept a 'default'
argument, similar to that used by 'lookupComponent()' and most other
lookup-like APIs in PEAK.  This change was made so that component lookups
don't need to rely on catching 'exceptions.NameNotFound' errors to tell them
when to use the default value.  This could hide 'NameNotFound' errors that
were actually from a broken component somewhere in the lookup process.  (In
general, it's probably a bad idea to have an exception that's used for both
control flow and real errors!)

Also, removed most trapping of 'NameNotFound' errors throughout PEAK,
except for those in N2, which I'll leave for Ty.  :)  Last, but not least,
cleaned up documentation of related interfaces/methods.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/CHANGES.txt.diff?r1=1.80&r2=1.81
http://cvs.eby-sarna.com/PEAK/TODO.txt.diff?r1=1.71&r2=1.72
http://cvs.eby-sarna.com/PEAK/src/peak/binding/components.py.diff?r1=1.124&r2=1.125
http://cvs.eby-sarna.com/PEAK/src/peak/binding/interfaces.py.diff?r1=1.16&r2=1.17
http://cvs.eby-sarna.com/PEAK/src/peak/naming/api.py.diff?r1=1.24&r2=1.25
http://cvs.eby-sarna.com/PEAK/src/peak/naming/contexts.py.diff?r1=1.56&r2=1.57
http://cvs.eby-sarna.com/PEAK/src/peak/naming/interfaces.py.diff?r1=1.44&r2=1.45
http://cvs.eby-sarna.com/PEAK/src/peak/naming/names.py.diff?r1=1.58&r2=1.59
http://cvs.eby-sarna.com/PEAK/src/peak/running/commands.py.diff?r1=1.35&r2=1.36

To generate a diff of this commit:
cvs rdiff -r1.80 -r1.81 PEAK/CHANGES.txt
cvs rdiff -r1.71 -r1.72 PEAK/TODO.txt
cvs rdiff -r1.124 -r1.125 PEAK/src/peak/binding/components.py
cvs rdiff -r1.16 -r1.17 PEAK/src/peak/binding/interfaces.py
cvs rdiff -r1.24 -r1.25 PEAK/src/peak/naming/api.py
cvs rdiff -r1.56 -r1.57 PEAK/src/peak/naming/contexts.py
cvs rdiff -r1.44 -r1.45 PEAK/src/peak/naming/interfaces.py
cvs rdiff -r1.58 -r1.59 PEAK/src/peak/naming/names.py
cvs rdiff -r1.35 -r1.36 PEAK/src/peak/running/commands.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