philhassey / tinypy

Automatically exported from code.google.com/p/tinypy
http://www.tinypy.org/
Other
236 stars 53 forks source link

with <something> as: construct fails #60

Open inspell opened 7 years ago

inspell commented 7 years ago

Hello! I am trying to run a piece of code with tinypy (Yeah, I know it's 2017 but tinypy is great) and the code has some "with as :" constructs. Tinypy complain with "Exception: error: encode". I guess this construct is not supported but I wanted to verify that. I also got exception for "except Exception as e:" constructs but those I was able to rewrite as "except Exception, e:". Can I do something similar with the "with .." constructs or I need to rewrite them with try/finally?