Greetings,

I'm trying to re-purpose the lib2to3 module and along the way came up with
this pattern:

"funcdef<'def' name=NAME parameters ['->' test] ':' suite=suite>"

It seems to have 2 problems:

   1. Single-line defs are not matched. Eg: "def singleLineFunc(): return 1
   + 2" is not matched, but "def multiLineFunc():\n   a = 1 + 2\n   return a"
   is matched.
   2. The first multi-line function in a file is matched twice (eg, the same
   node, results pair is passed to the transform method.

Why are these happening? If anyone could point me to a general discussion
about creating these would be most helpful. I haven't found a lot of
resources for these and investigating has been more of a struggle than
usual.

Thanks,

--
Zachary Burns
(407)590-4814
Aim - Zac256FL
Production Engineer (Digital Overlord)
Zindagi Games
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to