|
From: Nicola L. <ni...@te...> - 2006-12-30 11:07:04
|
Jack Kuan wrote: > Hi all, > > attached is my version of configobj.py modified from configobj 4.3.2. Sorry for the delay, Jack. At least we got to it within the month (and the year). :-) We talked about your proposed feature. The outcome is still open on a couple of them, but here goes. > It includes the following changes: > > - pickling support I don't like it. It doesn't seem very useful in this case, and pickling is fairly unmaintainable and insecure, I don't ever use it. But Michael has a more positive opinion about it, let's see how it pans out. > - list interpolation. For example: > k = 1,2,3 > h = %(k)s > g = interpolate %(k)s into a string > f = interpolate, %(k)s, into, a, list > l = %(k)s, > can be interpreted as the following: > k = 1,2,3 > h = "1,2,3" > g = "interpolate 1, 2, 3 into a string" > f = interpolate, 1, 2, 3, into, a, list > l = 1, 2, 3 We don't see use specific use cases for this, so we're going to reject it. > - environment variable interpolation. Eg, %(PATH)e gives the value of > the PATH environment variable I think it may be useful, we're still looking into this. > - "section path interpolation". Example: > %(a/b/c/k)p interpolates the value of key, k, of subsection c of > subsection b of subsection a of the current section. > .. and . and absolute path can be used as well: > eg, %(../a/b/c/k)p %(/a/b/c/k)p > '/' can be escaped with \/ and . can be escaped with \. This kind of syntactic sugar does not seem very useful, so it's not going in either. > - double % escapes interpolation, ie. %%(abc)s gives %(abc)s literally This is already in, as part of an earlier enhancement. > - added two methods, lookup and fetch, to Section, to search a key > upward the tree. As above, we don't see use specific use cases for this, so we're going to drop it too. In summary, one feature is already in, two are still in discussion, and three are not going in. Thanks for your contribution, and sorry for forcing you to keep maintaining you own fork; alas, ConfigObj is already fairly bloated, and we don't feel like keeping on bloating it without fairly good reasons. -- Nicola Larosa - http://www.tekNico.net/ All we're asking is that you stop spreading misinformation about the current state of dynamic languages to the press, analysts, and your customers. This does not require you to champion or otherwise support these technologies - just stop lying about them. -- Ryan Tomayko to James Gosling, March 2006 |