E&S CVS Commit: TransWarp - Established new API idiom for **kw/mapping/items variants of API calls.

pje at eby-sarna.com pje at eby-sarna.com
Mon Mar 11 16:53:00 EST 2002


Module Name:	TransWarp
Committed By:	pje
Date:		Mon Mar 11 21:52:02 UTC 2002

Modified Files:
	TransWarp/docs: TODO.txt
	TransWarp/src/TW/API: Misc.py
	TransWarp/src/TW/Database: DataModel.py LDAPModel.py
	TransWarp/src/TW/Utils: MiniTable.py

Log Message:
Established new API idiom for **kw/mapping/items variants of API calls.

Specifically, the new preferred API parameter form is to accept a list of
key/value pairs (e.g. 'dict.items()'), as that is generally the most
efficient format for non-trivial manipulation.  In essence, if an API
call previously took '**' keyword arguments (and perhaps a mapping as
well), it probably now takes an item list.  The exceptions are things
like constructors for infrequently created objects, and calls which pass
keyword arguments through to outside functions (e.g. in TW.Callbacks).

For situations where the old syntactic sugar is desired, there is now an
'Items()' API call which converts an optional mapping and keyword
arguments into an itmes list for you.  See the docs for the TW.API.Misc
module for details.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/TransWarp/docs/TODO.txt.diff?r1=1.9&r2=1.10
http://cvs.eby-sarna.com/TransWarp/src/TW/API/Misc.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/TransWarp/src/TW/Database/DataModel.py.diff?r1=1.19&r2=1.20
http://cvs.eby-sarna.com/TransWarp/src/TW/Database/LDAPModel.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/TransWarp/src/TW/Utils/MiniTable.py.diff?r1=1.1&r2=1.2

To generate a diff of this commit:
cvs rdiff -r1.9 -r1.10 TransWarp/docs/TODO.txt
cvs rdiff -r1.4 -r1.5 TransWarp/src/TW/API/Misc.py
cvs rdiff -r1.19 -r1.20 TransWarp/src/TW/Database/DataModel.py
cvs rdiff -r1.4 -r1.5 TransWarp/src/TW/Database/LDAPModel.py
cvs rdiff -r1.1 -r1.2 TransWarp/src/TW/Utils/MiniTable.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