I'm trying to see if I can get Peter Norvig's lis.py (from here: http://norvig.com/lispy.html) to translate using translate.py, but I get the following error:
AnnotatorError: [translation:ERROR] -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ [translation:ERROR] Blocked block -- operation cannot succeed [translation:ERROR] v0 = getattr(s_0, ('replace')) [translation:ERROR] In <FunctionGraph of (lis:83)tokenize at 0x8f646e4>: [translation:ERROR] Happened at file lispy/lis.py line 85 [translation:ERROR] [translation:ERROR] ==> output = s.replace('(',' ( ') [translation:ERROR] output = output.replace( ')', ' ) ') [translation:ERROR] return output.split() [translation:ERROR] [translation:ERROR] Known variable annotations: [translation:ERROR] s_0 = SomePBC(can_be_None=True, const=None, subset_of=None) caused by: def tokenize(s): "Convert a string into a list of tokens." output = s.replace('(',' ( ') output = output.replace( ')', ' ) ') return output.split() It's not clear to me what the issue is. Is there another type that has a replace method that is confusing the type inference system? Thanks, --Nathan
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev