super, guido's new tutorial Edward K. Ream <edream...@gmail.com> 于2022年4月1日周五 21:39写道: > > Python 3.10 supports the new match statement. Don't panic, match is a "soft" > keyword. > > Imo, this is the coolest addition to python since acyncio: > > - Pep 634 describes the feature, > - Pep 635 gives the rationale, > - Pep 635 is a tutorial. > > Leo issue #2541provides support for the required new ast parse-tree nodes. > > I'm still trying to get my head around the "declarative" style of pattern > matching. It might be possible to improve Leo's fast-read algorithm using > this feature. > > It is possible to (conditionally) use the match statement in Leo's code. The > trick would be to put the new code in a separate file, say leoPython3.10.py. > To use the new code, you would try to import functions from this file, > falling back to legacy code if the import failed. > > Edward > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to leo-editor+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/leo-editor/69769d3d-c9ba-4fb8-b20a-db807ac86637n%40googlegroups.com.
-- ---------------- life is pathetic, go Pythonic. 人生苦短, Python当歌 ;-) 课: https://py.101.camp/ 怼: https://du.101.camp/ 俺: http://zoomquiet.io 许: http://creativecommons.org/licenses/by-sa/2.5/cn/ 怒: 冗余不做,日子甭过!备份不做,十恶不赦. KM keep growing environment culture which promoting organization learning ;-) -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAAFijRfMszU%3DkZ6VXt%3DO4JHYTsimTXQ1eS86F9DC9xW_o8pz4w%40mail.gmail.com.