[XML-SIG] Deep copy of an element from one document to another

Uche Ogbuji uche.ogbuji@fourthought.com
19 Jun 2002 09:50:46 -0600


On Wed, 2002-06-19 at 09:52, Fredrik Lundh wrote:
> uche wrote:
> 
> > Before I gave up, I considered a hack that would probably work,
> > but was too ugly for contemplation:
> > 
> > exec("yield")
> > 
> > I decided against this  :-)
> 
> so did Guido:
> 
> >>> def bar():
> ...      yield 10
> ...
> >>> bar()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "<stdin>", line 2, in bar
>   File "<string>", line 1
> SyntaxError: 'yield' outside function
> 
> (the compiler looks for a yield keyword when compiling the
> function body.  if found, it creates an iterator factory, not
> an ordinary function)

Ah.  Makes perfect sense.  SO I guess I'm glad I didn't venture down
that road.

Does anyone have any tricks they've used for dealing with syntax skew
like this?


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One (San Jose, Boston):
http://www.xmlconference.com/
DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html
The Languages of the Semantic Web -
http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html
XML, The Model Driven Architecture, and RDF @ XML Europe -
http://www.xmleurope.com/2002/kttrack.asp#themodel