[Ironpython-users] Warn user when using old print syntax
Markus Schaber
m.schaber at 3s-software.com
Wed Oct 12 08:58:17 CEST 2011
Hi, Dino,
Von: Dino Viehland [mailto:dinov at microsoft.com]
> So you want to warn if the file contains a print statement w/o from
> __future__ import print_function? What if it's a call to print such as
> print('foo') which is valid in both 2.x and 3.x?
Considering our user base, I could ignore this corner case, as the user can simply get rid of the warning by adding the import statement.
> Either way you should be able to just update ParsePrintStmt in Parser.cs.
> But dealing w/ the case of the parens would be a little more difficult -
> but I think you can just peek at the next token after print and see if it's
> a parenthesis right after we eat the print keyword.
Ok, I'll see whether I can do that.
Best regards
Markus Schaber
--
___________________________
We software Automation.
3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50
Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects
Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
More information about the Ironpython-users
mailing list