From brett at python.org Mon Jul 15 14:34:11 2019 From: brett at python.org (Brett Cannon) Date: Mon, 15 Jul 2019 11:34:11 -0700 Subject: [Python-porting] Porting Python 2 comments to Python 3 In-Reply-To: References: Message-ID: Are these doctests or just normal comments? If it's the the former I thought 2to3 fixed those. If it's the latter then you will probably have to take 2to3 and use it to write your own code rewriter to update the comments. On Mon, Jul 15, 2019 at 4:59 AM Fenil Mehta wrote: > Hi, > > I am working on a large project with lots of comments having Python 2 > program along with program explanations. > I want to port all the Python 2 statements in comments to Python 3 > automatically. > Please suggest some ways to do this. Thanks in advance. > > Regards, > Fenil Mehta > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > https://mail.python.org/mailman/listinfo/python-porting > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fenilgmehta at gmail.com Wed Jul 17 23:04:24 2019 From: fenilgmehta at gmail.com (Fenil Mehta) Date: Thu, 18 Jul 2019 03:04:24 -0000 Subject: [Python-porting] Porting Python 2 comments to Python 3 In-Reply-To: References: Message-ID: Hi, Unfortunately it's the latter. So, I will have to write a module for it. Thanks for the suggestion. Regards, Fenil Mehta On Tue, Jul 16, 2019 at 12:04 AM Brett Cannon wrote: > Are these doctests or just normal comments? If it's the the former I > thought 2to3 fixed those. If it's the latter then you will probably have to > take 2to3 and use it to write your own code rewriter to update the comments. > > On Mon, Jul 15, 2019 at 4:59 AM Fenil Mehta wrote: > >> Hi, >> >> I am working on a large project with lots of comments having Python 2 >> program along with program explanations. >> I want to port all the Python 2 statements in comments to Python 3 >> automatically. >> Please suggest some ways to do this. Thanks in advance. >> >> Regards, >> Fenil Mehta >> _______________________________________________ >> Python-porting mailing list >> Python-porting at python.org >> https://mail.python.org/mailman/listinfo/python-porting >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: