Revisit Python from statements and PEG

nikkie

nikkie

Nikkie began his career as a software engineer in 2016. He started Python as a hobby in 2017 and fell in love with it. He is engaged in Natural Language Processing as a data scientist at Uzabase, inc. Tokyo, Japan from 2019. He is working on the Python community in Japan as a staff of the following event: - [PyCon Japan](https://www.pycon.jp/organizer/index.html): the largest PyCon in Japan - staff on 2019 and 2020 (Program committee, lead on 2020) - [chair](https://pyconjp.blogspot.com/2020/10/pyconjp-2021-chair.html) on 2021 He gave a talk (and lightning talks) at many PyCons in Japan and abroad. - EuroPython 2020, [PyCon APAC 2020](https://youtu.be/JiXnEA7pM7U) (English) He loves anime (Japanese animetation) as much as Python, and implements ideas related to some anime with Python. In 2022, he write code related to "Sing a Bit of Harmony" (e.g. Twitter bot, prototyping AI character, e.t.c.).

    摘要

    In learning Python, everyone learns `if` statements, `for` statements, and function definitions. At that time, you will also learn that `if` and `for` lines must be followed by a colon and that the following line must be indented (because SyntaxError will be raised). So why are these colons and indentations necessary? It is because Python is designed to be so[1][2], but a deep dive into "statements" in the Python Language Reference led me to an explanation that makes sense to me. In this talk, I will take you a tour of the syntax definition, expressed concisely and without omissions in PEG (Parsing Expression Grammar). [1] https://docs.python.org/3/faq/design.html#why-are-colons-required-for-the-if-while-def-class-statements [2] https://docs.python.org/3/faq/design.html#why-does-python-use-indentation-for-grouping-of-statements

    說明

    影片

    地點

    R1

    時間

    第一天 • 12:55-13:25 (GMT+8)

    語言

    英文演講

    層級

    中階

    分類

    Python 核心