PyCon Hong Kong 2025

PyCon Hong Kong 2025

AI工具改變了Python甚麼 / How AI Tools Changed the Python Language
2025-10-11 , Track A(LT-14)
Language: 漢語

新興的AI工具,例如Github copilot和cursor,令寫程式更方便。但我發現這些工具俏俏地改變了Python這個語言,我會用幾個例子,預測未來Python這個語言的改變,我們可以做甚麼,以及為何這些改變會出現。

The new AI tools, such as GitHub Copilot or Cursor, have made programming easier. However, I observed that these tools silently changed the Python language. I will give a few examples to explain and predict the future of Python language. I will give my opinion on why this happens and what we can do about it.


一個語言並不限於語法,還有使用習慣,例如Microsoft喜歡用Hungarian notation寫C++。長久以來,Python都是以簡潔著稱,某程度上可能源於懶惰,所以type annotation和docstring的不見於所有程式。然而,AI工具的出現會令寫出這些「沒用的部件」更廉價,從而令之更盛行。另一方面,這些工具肯定令人少了思考,產出的語言更單一。我會用一些例題看看這些工具如何塑造Python的未來,以及解釋為何Python會比其他語言更容易受到AI工具的影響。
為配合比喻及笑話,這個講題會用廣東話,如觀眾要求配合,可即場改以英語進行。

A language is not only its syntax but also its conventions of usage. For example, Microsoft is famous for using Hungarian notation in C++.

Python is famous for its concise syntax. There are type annotations and docstrings in the language, but they are not used by all projects. This is partially because humans are too lazy to do this extra work. The availability of the AI tools will make these "useless bits" cheap to add and thus more common. On the other hand, AI outputs are more uniform, unoriginal, and dull. I will prove this with some examples. I will also explain why it is the case, why Python is more susceptible to these problems than other languages, and what we should do about it.

This talk is intended to be delivered in Cantonese because of the jokes and analogies, but it can be switched to English if the audiences prefer.

Adrian has been using Python for work for more than 20 years. Although not the only programming language to use, it is his favorite for quick experiments and prototyping. His interest is in mathematical modeling, number crunching, high performance computing, and in the last decade, machine learning and AI.