More information on Question about Code Generation
13 views
Skip to first unread message
Andrew Frances
unread,
Jul 28, 2021, 11:49:39 AM7/28/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to montrealpython
Hi Montreal Python group:
Some more information. I think something along the lines of 2to3.py. I am starting to look at Lib2to3 which in turn references LibCST as a solution moving forward. Still I would appreciate feedback.
Cheers,
Andrew
Yannick Gingras
unread,
Aug 9, 2021, 5:24:46 PM8/9/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Andrew Frances, montrealpython
Hi Andrew,
I think AST would would be better than whatever lib2to3 is using.
Starting with Python 3.9, lib2to3 is pending deprecation as a result of
Python changing its parser. The 3.9 release notes recommend using ast,
which will be maintained to support the new syntax features moving
forward.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Yannick Gingras, montrealpython
Hi Yannick:
Great to hear from you. Thanks for your input! Yes, the parser changed in Python 3.9. I ended up going with LibCST. LibCST is up to date, good documentation and it worked like a charm! If I get more work done (I'm writing tools for a Python based voice app), perhaps I can give a talk when MTL Python resumes in person.
Again, thanks for your input!
Cheers,
Andrew
Yannick Gingras
unread,
Aug 10, 2021, 11:44:12 AM8/10/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Andrew Frances, montrealpython
Great to know that LibCST is a viable option. By the way, you don't
have to wait until meetings resume in person since we have an excellent
series of virtual meetings since the start of the Pandemic:
https://www.meetup.com/Montreal-Python/events/