Collaborative writing start from below
從這裡開始共筆
Slido
This talk is about what makes python feel like python.
philosophy dilemma: If you replace all part of this ship, it is still the same ship?
as we changed python as we remove or add up things
(code survive over time)
we don't changed things (it's the same ship)
python is really written by a lot of people,… the things become more complicated.
Python is changed quite quickly.
Python is actually does not exist.
(radio waves metaphor. You can not see the pink color on the spectrum. It's combanation of different photons)
different people have different ideas
lives in minds
who says what is python and what is not - it's grammar
(rule_names example)
metagrammar: grammars describe grammars
describe what is python
(expanded rules)
LL1-grammar
simple and restrict
idomtic simple to write, coded in LL1
reference:Full Grammar specification
Left to right
parses input from left to right
Leftmost derivation
1 Token Lookahead
Biggest restriciton
Grammar restriction
(break example)
is something continue could be a simple statement?
(ambiguous rules)
it's importment that when you creating things do not get in the middle
(if you write after a grammar, it's ambiguous/complicated)
1st python 1990
https://peps.python.org/pep-0617/
in python sometimes we are introducing new keywords(ideas)
hard keywords: can not be used as varibles
soft keywords: contextual, some words can be used as variables(e.g. await, async in py3.4, 3.5), backward compatible
(e.g the use of underscore)
pep636 structure
Python 3.10 release note:
the two main topics
from __future__ import annotations
from __future__ import annotations
small projects and education
enterprise and large projects
PEP 649 is accepted for Python 3.12
maintanance: increase the Python team's maintenance bourden
compatibility: isses for C extensions
performance
NOGIL
packaging: for a while packages might need to be released in two versions (as GIL and NOGIL), which complicates releases and testing too
20
I/O bounded code: doesn't quite benefit from NOGIL
CPU bounded code: does benefit from NOGIL if there's parallelism
Mixed workload
01 0-3 years : experimental builds
02 3-5 years : suppported builds
03 5+ years : NOGIL is the only build of Python
global state
debugging is harder
implicit gil as lock
interoperabitpality
looking infrastructure
validation
@pyblogsal
it has to be something
as a thought experiment
can you share us one mistake you've made as a CPython
change from [] to main
. would you consider
. how would you suggest for
fantastic question, it's hard
. what's the hardest
Below is the part that speaker updated the talk/tutorial after speech
講者於演講後有更新或勘誤投影片的部份