syntax difference

Chris Angelico rosuav at gmail.com
Sun Jun 17 22:22:43 EDT 2018


On Mon, Jun 18, 2018 at 12:12 PM, Rick Johnson
<rantingrickjohnson at gmail.com> wrote:
>  Chris Angelico wrote:
> [...]
>> Awwww. Isn't it cute, how he thinks that comments are easier to remove
>> than other elements equally well defined in the grammar?
>
> And may we see your code that will remove all instances of type-hints error free?
>
> Hmm?
>
> I look forward to scraping the internet for source code i can try it on, and then posting the tracebacks here for all to see.

First, show me your perfect comment removal code. Don't forget to
correctly handle different source code encodings, backslashes escaping
newlines, and triple-quoted strings. Then if that is proven easy, I'll
show you how a small tweak will remove any other syntactic element you
like.

And yes, I know exactly what tool I would use for the job. If I ever
had to do something so stupid.

ChrisA



More information about the Python-list mailing list