id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
11542 Fix preparse_file to prevent constants from being assigned to nbruin was "In this [https://groups.google.com/group/sage-devel/browse_thread/thread/97757e7b9f0d3f5b?hl=en sage-devel thread] Tom Boothby observed that misc.preparse_file has a habit to replace integers by identifiers that are supposed to be constants. This transformation turns some ungrammatical strings into grammatical ones, such as
{{{
1=5
}}}
which gets preparsed to
{{{
_sage_const_1 = Integer(1)
_sage_const_5 = Integer(5)
_sage_const_1 =_sage_const_5
}}}
Note that there does not have to be a ""="" involved for this to happen:
{{{
[1^2 for j in range(10) for 1 in [1..2*1] ]
}}}
which only differs one keyword from the perfectly legal
{{{
[1^2 for j in range(10) if 1 in [1..2*1] ]
}}}
so it's likely that one has to fully parse the string to detect the problems." defect needs_work major sage-6.4 user interface kcrisman Martin von Gagern N/A u/gagern/ticket/11542 9a909f48f9f3fdeadefc2511d694a7b9ae37d214