[Rest2web-develop] Re: We forked validate.py
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-07-18 14:54:19
|
Hello Nicola, I've got meld - I'll have to merge back in what you've done with the docs. Not today - it's a bit manic :-( Obviously for any further work we need to agree specific areas that we should each work on - then we can just discuss how we integrate the different things we do, rather than both working on the same things at the same time ! I do have an implementation question. My current implementation for ConfigObj puts an attribute called 'configspec' on the main ConfigObj. This is the parsed configspec with all the tests, the structure follows the expected structure of your config file (obviously). I'm wondering if it would be better to have a configspec attribute for each Section - (as a dictionary). This would allow you to *individually* test values as well. The disadvantage of doing this is that you have to create each section at the point you parse the configspec, which is before you parse the config file. This means that sections that appear in the configspec, but *not* in the config file, will have to be created anyway. What do you think ? Anyway - I don't *think* I can blag IRC until I've put a proper effort into poking a hole in our work firewall. (Requires me to construct a website that looks like a building related website - I have registered a domain specially !). *But* - I'm going to try and get Jabber working. Best Regards, Fuzzy http://www.voidspace.org.uk/python Nicola Larosa wrote: > >>>>Michael, >>>>I'm looking (via the wonderful Meld program) at the differences between the >>>>last validate.py I committed, and the one you sent me yesterday. >>>> >>>>They do not have much in common. It looks like we started from a common >>>>point, and then worked indipendently from each other, going in two >>>>different directions. Probably you took a copy for working on it during >>>>your travel before my commit, that I did on Sunday 10. > > >>>Yes - I left on Saturday the ninth. >>> >>>As soon as you said you'd worked on it my heart sank. I've appreciated >>>your input so far and was looking forward to actually coding with you - >>>*and* moving to doctests is a very good idea. >>> >>>*But* - we'd already discussed how the previous system for validate.py >>>was insufficient - it needed to do type conversion instead of just >>>returning True/False for pass/fail. I didn't see any alternative but >>>reworking chunks of it. > > > Of course. I'm not looking for someone to blame, mostly because that > someone would be me. :-) I got enthusiastic and eager to use doctest, and > somehow forgot our discussion. > > I'll reuse most of what I did anyway, it was all good experience. > > > >>>>We'll have to better coordinate our efforts in the future, to avoid >>>>repeating such unfortunate occurrences. I now intend to adapt the tests in >>>>your new version to doctest, dropping the one I committed, but this time >>>>I'll wait for confirmation from you before proceeding. > > >>>Ok - I'm pretty sure I've made no changes to validate.py since I sent it >>>to you. Feel free to add an alphanumeric test (and/or url_safe test which >>>might be a more useful set of characters to test for). > > > Mmh... alphanumeric? url_safe? Not exactly the answer I was waiting for, > but I'll go ahead and integrate doctest in the new validate.py, while > crossing fingers at the same time (kind of hard programming this way, > actually...). ;-) > > -- > Nicola Larosa - ni...@te... > > Learning C after learning Python can be done via Pyrex. [...] > Learning Java after learning Python can be done via Jython. [...] > Learning Perl after learning Python can ... never mind. ;-) > -- André Roberge, May 2005 > |