> It appears to be a simple change, but strangely, I'm not being able to > perform it. I already made correct modifications in Grammar/Grammar > file, the new keywords already appear in Lib/keyword.py and I also > changed the function validate_comp_op in Modules/parsermodule.c: > > static int > validate_comp_op(node *tree) > { > (...) > else if ((res = validate_numnodes(tree, 2, "comp_op")) != 0) { > res = (validate_ntype(CHILD(tree, 0), NAME) > && validate_ntype(CHILD(tree, 1), NAME) > && (((strcmp(STR(CHILD(tree, 0)), "não") == 0) > && (strcmp(STR(CHILD(tree, 1)), "é") == 0)) > || ((strcmp(STR(CHILD(tree, 0)), "não") == 0) > && (strcmp(STR(CHILD(tree, 1)), "em") == 0)))); > if (!res && !PyErr_Occurred()) > err_string("operador de comparação desconhecido"); > } > return (res); > } >
Notice that Python source is represented in UTF-8 in the parser. It might be that the C source code has a different encoding, which would cause the strcmp to fail. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com