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.).

    Abstract

    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

    Description

    Video

    Location

    R1

    Date

    Day 1 • 12:55-13:25 (GMT+8)

    Language

    English talk

    Level

    Intermediate

    Category

    Python Core