python 3.9.0

Ho lokollotsoe tokollo e ncha e tsitsitseng ea puo e tsebahalang ea lenaneo la Python.

Python ke puo ea maemo a holimo, e sebelisoang molemong oa kakaretso e reretsoeng ho ntlafatsa tlhahiso ea bahlahisi le ho baloa ha khoutu. Likarolo tse ka sehloohong ke ho thaepa ka matla, taolo ea memori ea othomathike, ho itlhahloba ka botlalo, mokhoa oa ho sebetsana le mokhelo, tšehetso ea likhomphutha tse nang le likhoele tse ngata, meaho ea data ea boemo bo holimo.

Python ke puo e tsitsitseng le e atileng. E sebelisoa mererong e mengata le ka bokhoni bo fapaneng: joalo ka puo ea mantlha ea lenaneo kapa bakeng sa ho theha likatoloso le likhokahano tsa ts'ebeliso. Libaka tse ka sehloohong tsa ts'ebeliso: nts'etsopele ea webo, ho ithuta ka mochini le tlhahlobo ea data, automation le tsamaiso ea sistimi. Python hajoale e maemong a boraro maemong TIOBE.

Liphetoho tse kholo:

Sebapali se secha sa tšebetso e phahameng se ipapisitseng le li-grammar tsa PEG.

Phetolelong e ncha, parser ea hajoale ea Python e ipapisitseng le li-grammar tsa LL(1) (KS-grammar) e nkeloa sebaka ke sehatisi se secha sa ts'ebetso e phahameng le se tsitsitseng se thehiloeng ho PEG (PB-grammar). Li-parser tsa lipuo tse emeloang ke li-grammar tsa KS, joalo ka li-parser tsa LR, li hloka mohato o khethehileng oa tlhahlobo ea lexical o qhekellang tlhahiso ho latela sebaka se sesoeu, matšoao a puo, joalo-joalo. Sena sea hlokahala hobane lihlopha tsena li sebelisa ho itokisetsa ho sebetsana le li-grammar tsa KS ka nako ea mola. Li-grammar tsa RV ha li hloke mohato o fapaneng oa tlhahlobo ea lexical, 'me melao ea eona e ka beoa hammoho le melao e meng ea sebōpeho-puo.

Basebelisi ba bacha le mesebetsi

Basebelisi ba babeli ba bacha ba ekelitsoe sehlopheng sa dict se hahiloeng, | bakeng sa ho kopanya dikishinari le |= bakeng sa ho nchafatsa.

Mesebetsi e 'meli e mecha e kenyelelitsoe sehlopheng sa str: str.removeprefix(prefix) le str.removesuffix(sehlongoana).

Tlanya likeletso bakeng sa mefuta ea pokello e hahelletsoeng ka hare

Tokollo ena e kenyelletsa tšehetso ea syntax ea jenereithara likolekeng tsohle tse tloaelehileng tse fumanehang hajoale.

def read_blog_tags(tags: list[str]) -> Ha ho letho:
bakeng sa li-tag ho li-tag:
hatisa ("Tag Name", tag)

Liphetoho tse ling

  • PEP 573 Ho fihlella Module State Ho Sebelisa Mekhoa ea Katoloso ea C

  • PEP 593 Mesebetsi e Fetohang le Litlhaloso tse Fetohang

  • PEP 602 Python e fallela ho litokollo tse tsitsitseng tsa selemo le selemo

  • PEP 614 Lithibelo tse Khathollang tsa Grammar ho Bakhabi

  • PEP 615 IANA Time Zone Database Support ho Library e Tloaelehileng

  • BPO 38379 Pokello ea litšila ha e thibele linthong tse fumanoeng

  • BPO 38692 os.pidfd_open, bakeng sa taolo ea lits'ebetso ntle le merabe le matšoao;

  • BPO 39926 Unicode tšehetso e ntlafalitsoeng hore e be mofuta oa 13.0.0

  • BPO 1635741, Python ha e sa lutla ha e qala Python makhetlo a mangata ts'ebetsong e le 'ngoe.

  • Lipokello tsa python (range, tuple, set, frozenset, lethathamo, dict) li potlakisitsoe ka mohala oa PEP 590 vector.

  • Li-module tse ling tsa Python (_abc, audioop, _bz2, _codecs, _contextvars, _crypt, _functools, _json, _locale, operator, resource, time, _weakref) joale li sebelisa polyphase initialization joalokaha ho hlalositsoe ho PEP 489

  • Li-module tse ngata tse tloaelehileng tsa laeborari (audioop, ast, grp, _hashlib, pwd, _posixsubprocess, random, select, struct, termios, zlib) joale li sebelisa ABI e tsitsitseng e hlalosoang ke PEP 384.

Source: linux.org.ru

Eketsa ka tlhaloso