Author: tack
Date: Sun Apr 15 20:52:39 2007
New Revision: 2627
Modified:
trunk/base/src/config.py
Log:
Support for implicit indexing of lists.
Modified: trunk/base/src/config.py
==============================================================================
--- trunk/base/src/config.py (original)
+++ trunk/base/src/config.py Sun Apr 15 20:52:39 2007
@@ -732,7 +732,11 @@
key = keylist[0]
value = value.strip()
if isinstance(object, (Dict, List)):
- object[key[1:-1]] = value
+ key = key[1:-1]
+ if not key and isinstance(object, List):
+ # Implicit indexing for Lists.
+ key = len(object)
+ object[key] = value
else:
setattr(object, key, value)
except Exception, e:
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog