On Tue, May 24, 2016 at 11:20 AM, Nils Bruin <[email protected]> wrote:
> On Tuesday, May 24, 2016 at 10:21:34 AM UTC-7, William wrote:
>>
>> Breaking "print a" will cause a truly epic level of pain to our users for
>> no real gain...  So much so that probably no matter what is decided here I
>> would fork sage to add handling this to the pre-processor for sage on SMC.
>
>
> Preprocessing "print" in a robust and reliable way will be a bit of a
> challenge, though. In python 3, this is now valid:
>
> (print(1), print(2))
>
> and this too:
>
>>>> print=2
>>>> print-1
> 1
>
> I guess in the sage command line, "print" would still be advertised as a
> reserved word, so we wouldn't have to handle the latter scenario, but
> figuring out where the parentheses go for other uses of print is going to be
> tricky. I'm not sure something that is just regex based will do the job.

Damn reality.   I had imagined pre-parsing only

   print [whitespace] [non whitespace that doesn't start with a paren]

and nothing else.   If the user uses print as a variable, this would
break their code. I'm OK with that.



William

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to