X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Futil.py;h=795bf57c7bb645eedda0792bb2e58d6972be7e62;hb=0417f41c0ae50eb2027a5109b85dbf1f103b1c80;hp=a913e7466cc06684062c2298590362f55b300553;hpb=f3464a4a95d776ac14e32f8203340a9ae08795e5;p=wrw.git diff --git a/wrw/sp/util.py b/wrw/sp/util.py index a913e74..795bf57 100644 --- a/wrw/sp/util.py +++ b/wrw/sp/util.py @@ -140,6 +140,10 @@ class formatter(object): def output(cls, out, el, *args, **kw): cls(out=out, root=el, *args, **kw).start() + @classmethod + def fragment(cls, out, el, *args, **kw): + cls(out=out, root=el, *args, **kw).node(el) + def update(self, **ch): ret = type(self).__new__(type(self)) ret.__dict__.update(self.__dict__)