[Twisted-Python] [PATCH] domhelpers.py
I've been working on porting the blog example to the new 0.19 DOMTemplate format, as an opportunity to play with some Twisted code. In doing so, I think I've found this big, bad single-line, 5 character patch for domhelpers.py. Patch is attached. AFAICT, this is correct; I'll admit, though, I'm a python journeyman at best, so I may have mis-fixed. Also, I should be finished with the blog example in a day or two...is there interest in replacing the old-style one? If so, where should I send the code? After finishing the straight port, I'm going to look at implementing some authorization via Twisted Cred; I'm trying to decide between using Zope and Twisted for some future projects, so I'm playing with comparable functionalities...I have to admit, Twisted is pretty dang cool! Take care... -- Ken Kennedy | http://www.kenzoid.com | kenzoid@io.com
On Tuesday, July 23, 2002, at 04:43 PM, Ken Kennedy wrote:
I've been working on porting the blog example to the new 0.19 DOMTemplate format, as an opportunity to play with some Twisted code. In doing so, I think I've found this big, bad single-line, 5 character patch for domhelpers.py. Patch is attached. AFAICT, this is correct; I'll admit, though, I'm a python journeyman at best, so I may have mis-fixed.
Yes, indeed, that's a typo, and your fix is correct. Obviously that bug was left over from a refactoring of substitute from a method to a function. Really shows me I need to write more unit tests.
Also, I should be finished with the blog example in a day or two...is there interest in replacing the old-style one? If so, where should I send the code? After finishing the straight port, I'm going to look at implementing some authorization via Twisted Cred; I'm trying to decide between using Zope and Twisted for some future projects, so I'm playing with comparable functionalities...I have to admit, Twisted is pretty dang cool!
Wow. I wrote both Blog and DOMTemplate, and I had been planning on refactoring Blog sometime soon, but hadn't gotten around to it. I didn't think anybody cared enough! *sniff* Thank you. :-) Donovan
On Wed, Jul 24, 2002 at 10:43:58AM -0700, Donovan Preston wrote:
Yes, indeed, that's a typo, and your fix is correct. Obviously that bug was left over from a refactoring of substitute from a method to a function. Really shows me I need to write more unit tests.
Heh...I hear ya. I need to learn the "write unit tests first" habit myself, but I'm a LONG way from that!
Also, I should be finished with the blog example in a day or two...is there interest in replacing the old-style one?
Wow. I wrote both Blog and DOMTemplate, and I had been planning on refactoring Blog sometime soon, but hadn't gotten around to it. I didn't think anybody cared enough! *sniff* Thank you. :-)
No sweat. It's a nice, compact little ball o' Twistiness...uses DOMTemplate, plugins.tml, the MVC stuff, etc. all in one fell swoop. Poking my way through it gives me a good insight into Twisted web development. I got lazy and rented a movie last night, but I'll be back on it tonight. -- Ken Kennedy | http://www.kenzoid.com | kenzoid@io.com
participants (2)
-
Donovan Preston
-
kkennedy@kenzoid.com