Meta tags:
Headings (most frequently used words):
and, implementations, python, language, syntax, development, languages, reference, implementation, other, programming, contents, history, design, philosophy, features, semantics, code, examples, libraries, environments, naming, influenced, by, see, also, notes, references, further, reading, external, links, enhancement, proposals, indentation, statements, control, flow, expressions, typing, arithmetic, operations, function, limitations, of, the, unsupported, transpilers, to, performance, sources,
Text of the page (most frequently used words):
python (567), the (535), and (248), from (216), retrieved (186), original (162), archived (161), for (147), with (84), 2020 (74), #language (70), software (69), may (66), are (66), code (63), programming (62), june (61), pep (51), org (49), january (47), that (46), languages (42), august (42), february (41), which (40), this (37), foundation (36), 2026 (35), december (35), 2012 (34), enhancement (33), support (32), october (32), 2021 (31), july (31), proposals (31), statement (30), was (30), not (30), march (29), november (29), 2019 (29), 2024 (28), van (28), rossum (28), cpython (28), also (28), operator (28), 2023 (27), new (27), type (27), can (27), documentation (26), april (26), used (26), use (25), such (25), source (24), guido (24), pypy (24), 2022 (24), peps (24), 2025 (23), other (23), types (22), list (22), 2018 (22), release (22), has (22), reference (21), object (20), standard (20), implementations (20), syntax (20), some (20), expressions (20), than (20), there (20), free (19), division (19), version (19), using (18), september (18), statements (18), all (18), string (18), but (18), written (17), data (17), library (17), development (17), features (17), versions (17), many (17), immutable (17), example (16), 2009 (16), com (16), 2017 (16), 2011 (16), time (16), function (16), bit (16), open (15), general (15), implementation (15), since (15), expression (15), number (15), uses (15), articles (14), most (14), docs (14), performance (14), compiler (14), interpreter (14), method (14), wikipedia (13), 978 (13), isbn (13), like (13), design (13), releases (13), numpy (13), functions (13), typing (13), modules (13), including (13), oriented (12), platform (12), its (12), pdf (12), speed (12), does (12), one (12), project (11), tools (11), julia (11), only (11), history (11), 2013 (11), programs (11), while (11), 2014 (11), block (11), 2015 (11), 2016 (11), style (11), indentation (11), called (11), have (11), machine (11), released (11), semantics (11), then (11), variable (11), class (10), comparison (10), windows (10), libraries (10), what (10), google (10), dynamic (10), precision (10), spam (10), eggs (10), contain (10), supported (10), these (10), into (10), compiles (10), supports (10), value (10), license (9), web (9), computing (9), security (9), more (9), javascript (9), net (9), mojo (9), guide (9), built (9), snek (9), round (9), operations (9), first (9), adding (9), part (9), often (9), program (9), non (8), information (8), level (8), computer (8), based (8), index (8), community (8), systems (8), perl (8), why (8), 2008 (8), github (8), integer (8), integers (8), floating (8), point (8), floats (8), just (8), though (8), their (8), where (8), name (8), rather (8), before (8), several (8), include (8), current (8), however (8), negative (8), true (8), developers (7), about (7), monty (7), typed (7), jupyter (7), idle (7), ruby (7), how (7), compatible (7), 2010 (7), 2007 (7), stack (7), after (7), developer (7), 2000 (7), memory (7), few (7), arithmetic (7), double (7), optional (7), generator (7), well (7), module (7), functional (7), been (7), import (7), see (7), influenced (7), designed (7), major (7), each (7), set (7), multiple (7), run (7), allows (7), subset (7), numbers (7), both (7), toggle (6), contents (6), available (6), terms (6), last (6), links (6), containing (6), english (6), references (6), created (6), high (6), gnu (6), core (6), long (6), learning (6), haskell (6), stackless (6), jython (6), ironpython (6), micropython (6), cython (6), via (6), over (6), media (6), reilly (6), approach (6), package (6), wiki (6), generators (6), should (6), 2001 (6), nuitka (6), inspired (6), out (6), codon (6), introduction (6), platforms (6), classes (6), changes (6), special (6), when (6), range (6), group (6), final (6), same (6), different (6), bytecode (6), ide (6), must (6), were (6), following (6), allowing (6), common (6), older (6), main (6), series (6), single (6), print (6), operators (6), tuple (6), two (6), strings (6), view (5), you (5), page (5), pages (5), wikidata (5), potentially (5), description (5), technology (5), cross (5), control (5), sas (5), proprietary (5), ipython (5), portal (5), definition (5), android (5), operating (5), packages (5), lists (5), lisp (5), visual (5), zen (5), projects (5), pypi (5), specified (5), will (5), iterators (5), scientific (5), faq (5), runtime (5), static (5), optimization (5), returns (5), issues (5), extensions (5), enthought (5), environment (5), multiplication (5), ieee (5), mypy (5), hints (5), literal (5), tuples (5), conditional (5), faster (5), here (5), life (5), provides (5), keyword (5), comprehensions (5), unix (5), exception (5), raise (5), had (5), abc (5), file (5), feature (5), way (5), contains (5), they (5), large (5), three (5), third (5), expected (5), years (5), execution (5), parts (5), possible (5), arbitrary (5), unsupported (5), factorial (5), examples (5), rounding (5), values (5), mixed (5), sequence (5), mutable (5), keys (5), 105 (5), annotations (5), assignment (5), functionality (5), format (5), article (5), note (5), philosophy (5), readability (5), add (4), 120 (4), search (4), statistics (4), text (4), under (4), commons (4), dated (4), failed (4), verification (4), 1991 (4), paradigm (4), dynamically (4), science (4), frameworks (4), world (4), system (4), commercial (4), related (4), management (4), apache (4), mathematics (4), alternative (4), pytorch (4), swift (4), java (4), pycon (4), conference (4), ides (4), psyco (4), numba (4), circuitpython (4), official (4), mark (4), 2005 (4), gdscript (4), because (4), providing (4), cobra (4), chris (4), else (4), bug (4), dev (4), cycle (4), never (4), david (4), purpose (4), real (4), loops (4), array (4), transcrypt (4), rustpython (4), embedded (4), between (4), team (4), download (4), 2003 (4), 2006 (4), decimal (4), infix (4), matrix (4), 754 (4), limitations (4), artima (4), ways (4), creating (4), names (4), steering (4), council (4), provided (4), test (4), coffeescript (4), regular (4), added (4), flow (4), working (4), instance (4), call (4), modula (4), users (4), even (4), blocks (4), introduced (4), although (4), files (4), read (4), describe (4), process (4), known (4), variables (4), naming (4), during (4), incremented (4), backward (4), through (4), lock (4), compiled (4), compilers (4), full (4), case (4), changed (4), cases (4), offers (4), larger (4), dictionaries (4), contrast (4), usage (4), typically (4), environments (4), update (4), includes (4), hello (4), boolean (4), less (4), result (4), always (4), half (4), represents (4), floor (4), bytes (4), ascii (4), bytearray (4), cannot (4), end (4), elements (4), marks (4), blah (4), side (4), lazy (4), garbage (4), updates (4), hide (4), move (4), sidebar (4), subsection (4), policy (3), additional (3), sister (3), specifically (3), marked (3), weasel (3), worded (3), phrases (3), multi (3), netherlands (3), interface (3), matlab (3), sagemath (3), numerical (3), category (3), plus (3), public (3), hardware (3), linux (3), works (3), guidelines (3), mit (3), movement (3), applications (3), timeline (3), term (3), hosting (3), scikit (3), learn (3), shell (3), rust (3), pascal (3), classic (3), apl (3), algol (3), ada (3), spyder (3), pycharm (3), unladen (3), swallow (3), shed (3), skin (3), tutorial (3), website (3), wikibooks (3), external (3), 2nd (3), lutz (3), further (3), sources (3), already (3), right (3), goal (3), superset (3), existing (3), immediately (3), tail (3), back (3), 2002 (3), press (3), overflow (3), return (3), lwn (3), according (3), cannon (3), brett (3), mailing (3), warsaw (3), jeremy (3), www (3), francisco (3), grumpy (3), makes (3), doi (3), browser (3), brython (3), nokia (3), application (3), lego (3), yet (3), fork (3), energy (3), openvms (3), vms (3), building (3), canopy (3), studio (3), integrated (3), server (3), oracle (3), build (3), zadka (3), moshe (3), pandas (3), almost (3), coroutines (3), errors (3), exceptions (3), beginning (3), programmers (3), proposal (3), printer (3), speedup (3), culture (3), insider (3), walrus (3), help (3), rule (3), peters (3), tim (3), itertools (3), efficient (3), counting (3), candidate (3), peterson (3), benjamin (3), schedule (3), kuchling (3), down (3), benevolent (3), dictator (3), literals (3), lattner (3), clu (3), something (3), similar (3), those (3), found (3), commonly (3), lambda (3), small (3), simple (3), borrowed (3), intended (3), order (3), being (3), later (3), self (3), parameter (3), extensive (3), interpreted (3), very (3), associated (3), pyc (3), tests (3), strongly (3), unofficial (3), tier (3), macos (3), except (3), zero (3), document (3), british (3), comedy (3), sometimes (3), referred (3), testing (3), running (3), unit (3), made (3), fixed (3), starting (3), break (3), until (3), improved (3), tasks (3), compilation (3), compiling (3), approaches (3), despite (3), addition (3), relative (3), compile (3), experimental (3), transpilers (3), implemented (3), certain (3), began (3), five (3), multithreading (3), thus (3), microcontrollers (3), unlike (3), times (3), least (3), unordered (3), worse (3), factor (3), 145 (3), party (3), shells (3), receive (3), results (3), loop (3), def (3), defined (3), would (3), 119 (3), float (3), adds (3), equation (3), positive (3), rules (3), behavior (3), element (3), hashable (3), frozenset (3), 107 (3), complex (3), objects (3), distinction (3), indexes (3), slice (3), stop (3), start (3), quotation (3), left (3), hand (3), equal (3), sign (3), better (3), pass (3), create (3), try (3), executes (3), keywords (3), semantic (3), easily (3), considered (3), his (3), late (3), stable (3), earlier (3), table (2), mobile (2), contact (2), privacy (2), apply (2), wikimedia (2), inc (2), creative (2), hidden (2), categories (2), namespace (2), unsourced (2), american (2), short (2), scripting (2), pattern (2), matching (2), dutch (2), concurrent (2), notebook (2), php (2), title (2), fast (2), international (2), databases (2), viya (2), mathematica (2), mathcad (2), maple (2), gauss (2), discontinued (2), lia (2), gretl (2), octave (2), mathematical (2), admb (2), advanced (2), unistat (2), excel (2), ons (2), revolution (2), ibm (2), spss (2), graphpad (2), pymc (2), orange (2), info (2), domain (2), statistical (2), shared (2), initiative (2), model (2), topics (2), device (2), drivers (2), licenses (2), standards (2), bsd (2), events (2), formerly (2), ios (2), apps (2), suites (2), outline (2), mindspore (2), jax (2), theano (2), keras (2), tensorflow (2), computational (2), theory (2), geometry (2), differentiable (2), zope (2), web2py (2), turbogears (2), tornado (2), quixote (2), pyramid (2), pylons (2), nevow (2), grok (2), flask (2), fastapi (2), django (2), cubicweb (2), cherrypy (2), fortran (2), basic (2), designer (2), wsgi (2), eric (2), s60 (2), clpython (2), took (2), wikiversity (2), wikiquote (2), addison (2), wesley (2), professional (2), 596 (2), 3rd (2), think (2), reading (2), artificial (2), intelligence (2), modern (2), michael (2), member (2), massively (2), provide (2), ecosystem (2), programmer (2), developing (2), modular (2), jason (2), ecmascript (2), acknowledgements (2), bill (2), fix (2), edge (2), jake (2), changing (2), annual (2), might (2), creator (2), moving (2), bugs (2), developed (2), barry (2), hylton (2), realpython (2), benchmarks (2), game (2), euroscipy (2), bibcode (2), numeric (2), framework (2), top (2), san (2), 11l (2), transpiler (2), alan (2), 014001 (2), 1749 (2), issn (2), pythran (2), home (2), n900 (2), optimizing (2), ready (2), cnx (2), another (2), lang (2), cinder (2), infoworld (2), pyston (2), ev3 (2), differences (2), install (2), compatibility (2), rui (2), joão (2), usa (2), proceedings (2), interview (2), vmspython (2), vmssoftware (2), changelog (2), byte (2), harper (2), university (2), interactive (2), eby (2), phillip (2), 333 (2), gateway (2), network (2), reasons (2), research (2), dedicated (2), bitstring (2), readthedocs (2), formats (2), error (2), map (2), mypyc (2), 484 (2), section (2), interpolation (2), sequences (2), hettinger (2), raymond (2), elimination (2), pretty (2), manually (2), modifying (2), line (2), making (2), pyjl (2), martelli (2), alex (2), formatting (2), beta (2), controversial (2), discussions (2), looping (2), extending (2), counts (2), glue (2), who (2), 373 (2), playful (2), smith (2), journal (2), setl (2), introductory (2), course (2), identifying (2), book (2), internal (2), ideas (2), far (2), others (2), rails (2), paul (2), usable (2), rauschmayer (2), axel (2), nature (2), influences (2), popular (2), anonymous (2), lie (2), itself (2), dylan (2), resolution (2), get (2), implements (2), learned (2), handling (2), explicitly (2), slicing (2), icon (2), cwi (2), place (2), starlark (2), zip (2), von (2), löwis (2), martin (2), launcher (2), pyw (2), empty (2), filename (2), pyi (2), pyd (2), archives (2), guideline (2), del (2), bdfl (2), work (2), variants (2), notes (2), colab (2), pygtk (2), pyqt (2), pygame (2), scipy (2), pip (2), manager (2), books (2), nim (2), boo (2), groovy (2), among (2), whom (2), frequently (2), traditional (2), various (2), 188 (2), bar (2), foo (2), state (2), alpha (2), introduce (2), occur (2), 186 (2), exist (2), ported (2), incompatible (2), primary (2), specific (2), originally (2), hosted (2), repository (2), mostly (2), input (2), coding (2), covered (2), 178 (2), parallelism (2), global (2), respectively (2), pyrex (2), included (2), latest (2), transpiles (2), myhdl (2), specialized (2), rpython (2), jit (2), tool (2), claim (2), apple (2), cost (2), readable (2), claims (2), resulting (2), api (2), typical (2), limited (2), llvm (2), now (2), significant (2), differently (2), imperative (2), variant (2), statically (2), whose (2), nearly (2), native (2), extension (2), significantly (2), executable (2), entire (2), binary (2), sizes (2), capable (2), supporting (2), installer (2), fails (2), old (2), c11 (2), combination (2), emphasizes (2), pythonanywhere (2), notebooks (2), capabilities (2), 128 (2), needed (2), enter (2), eval (2), 125 (2), interfaces (2), int (2), default (2), input2 (2), input1 (2), interpret (2), produce (2), implies (2), interval (2), 114 (2), meaning (2), represent (2), produces (2), modulo (2), exponentiation (2), lines (2), unicode (2), character (2), str (2), duplicates (2), iterating (2), placeholder (2), operand (2), practice (2), ellipsis (2), false (2), dictionary (2), key (2), dict (2), enforced (2), kinds (2), own (2), instances (2), thereby (2), metaprogramming (2), them (2), duck (2), exec (2), duplicating (2), copy (2), step (2), escape (2), raw (2), compare (2), 101 (2), concatenated (2), evaluates (2), writable (2), assigns (2), iterable (2), given (2), initially (2), body (2), compares (2), passed (2), binds (2), any (2), construct (2), switch (2), implement (2), continues (2), exits (2), context (2), finally (2), caught (2), attached (2), curly (2), brackets (2), delimit (2), structure (2), meant (2), meanings (2), either (2), processes (2), pythonic (2), emphasis (2), patches (2), critical (2), achieve (2), minor (2), preferably (2), obvious (2), extensible (2), detecting (2), structured (2), paradigms (2), again (2), revision (2), completely (2), collection (2), longer (2), 1980s (2), successor (2), lead (2), permanent (2), transformers (2), ago (2), appearance (2), upload (2), edit (2), norsk (2), bahasa (2), basa (2), беларуская (2), log (2), account (2), donate (2), menu (2), topic, cookie, conduct, legal, safety, contacts, disclaimers, site, agree, registered, trademark, profit, organization, attribution, sharealike, rendered, parsoid, edited, utc, mismatch, dmy, dates, semi, protected, matches, educational, inventions, programmed, https, python_, programming_language, oldid, 1376500596, yale, lux, idref, israel, czech, republic, bnf, france, united, states, national, gnd, authority, vissim, speakeasy, mworks, labview, featool, multiphysics, dadisp, fortress, weka, x10, scilab, scicoslab, salome, openfoam, mfem, hon, pyt, gmsh, genius, freemat, freefem, euler, toolbox, chapel, simulation, analysis, xlfit, rexcel, bugsxla, analyse, unscrambler, systat, statxact, statsdirect, statistica, sigmastat, shazam, ncss, mlwin, minitab, microfit, medcalc, lisrel, limdep, genstat, eviews, bmdp, wps, winks, tsp, sudaan, statview, stata, smartpls, analytics, rats, oxmetrics, jmp, modeler, prism, instat, desk, winbugs, xplore, bv4, freeware, xlispstat, stan, sofa, simfit, rstudio, statsmodels, pspp, openbugs, thon, jmulti, jags, jasp, jamovi, dap, arima, cspro, epi, dataplot, cathedral, bazaar, microsoft, specification, promise, manifesto, forking, trusted, tivoization, patents, sco, controversies, firmware, mozilla, rebranding, proliferation, digital, rights, challenges, permissive, cultural, debian, copyleft, contributor, agreement, zlib, wtfpl, unlicense, sleepycat, mpl, isc, lgpl, agpl, gpl, epl, cddl, beerware, artistic, apsl, afl, india, organisations, advocacy, commerce, video, games, television, routing, office, health, wireless, graphics, configuration, codecs, bioinformatics, audio, directories, facilities, closed, portals, flux, spinnaker, memristor, vpu, tpu, ipu, inductive, bias, ricci, calculus, recognition, neuromorphic, automatic, differentiation, manifold, twistedweb, generational, categorical, alphabetical, smalltalk, scratch, sql, prolog, raku, ocaml, caml, lua, kotlin, forth, elixir, erlang, cobol, assembly, simula, asgi, pydev, cultrepo, youtube, story, documentary, resources, textbooks, quotations, ramalho, luciano, 4920, 5632, fluent, summerfield, 321, 68056, 5th, 15806, downey, allen, 0981, 5543, scientist, upper, saddle, river, prentice, hall, 604259, norvig, peter, russell, stuart, pyaiml, paine, jocelyn, amzi, expert, newsletter, spencer, datasciencelearningcenter, substack, family, embracing, simplifies, our, efforts, decided, embrace, enablement, expect, hope, familiar, enable, things, falls, kincaid, techcrunch, meets, es4, esterbrook, charles, lubanovic, sebastopol, 305, 4493, 5936, introducing, fehily, peachpit, 201, 74884, exchange, whetting, your, appetite, buildbot, aahz, baxter, anthony, norwitz, neal, schedules, stability, change, cadence, 602, hughes, owen, techrepublic, arrive, devguide, guys, goodger, look, murri, riccardo, european, 2014arxiv1404, 6388m, 1404, 6388, arxiv, runtimes, ironlanguages, ironpython3, thomas, claburn, theregister, opensource, guelton, serge, brunet, pierrick, amini, mehdi, merlini, adrien, corbillon, xavier, raynaud, iop, publishing, 4699, 1088, 4680, 2015cs, 8a4001g, discovery, enabling, infoq, anatomy, stochastic, plans, doc, packard, keith, kennedy, mkennedy, pythonbytes, find, git, famous, aufranc, cnxsoft, jean, luc, news, snekboard, controls, power, crowdfunding, aroca, rafael, blog, feels, arduinos, instagram, yegulalp, serdar, dead, education, lawson, loraine, speeds, pyinstaller, pereira, couto, marco, ribeiro, rua, cunha, jácome, fernandes, paulo, saraiva, sle, york, association, machinery, 267, 4503, 5525, 1145, 3136014, 3136031, 256, 10th, acm, sigplan, engineering, efficiency, across, relate, oreilly, wheels, vsi, internals, doug, spring, western, kentucky, wku, physics, 316, visualstudio, editor, glossary, piotrowski, przemyslaw, rapid, scott, washington, department, rocks, doesn, hoyt, koepke, batista, facundo, 327, kernighan, brian, ritchie, dennis, 1988, 206, beazley, 4th, 672, 32978, essential, floors, 238, 465, 237, unifying, exotic, arrownotimplementederror, halffloat, applying, to_feather, dataframe, machines, today, 498, 1rc2, 3rc1, 308, 0465, 380, 342, enhanced, forums, solving, puzzles, neopythonic, blogspot, recursion, highlights, 0a0, guttag, john, 262, 52962, computation, understanding, secnetix, myths, good, believemy, berry, goodder, hitchhiker, stuff, lumberjack, knights, pprint, powerful, force, specifying, necessary, obtained, translated, transpiling, ebeab, ravenscroft, anna, ascher, 230, 00797, cookbook, edition, bader, dan, best, practices, kemenade, hugo, grifski, renegade, coder, therenegadecoder, controversy, behind, ambi, chetan, simplified, pythonsimplified, confusion, regarding, 2004, 289, embedding, heavy, needs, strategy, avoid, leaks, freed, chosen, malloc, together, pydatalog, contracts, pydbc, preconditions, postconditions, invariants, cain, gang, ltd, metaclasses, status, mattip, sunsetting, coghlan, alyssa, 466, enhancements, briggs, lipovača, miran, california, starch, 26119645m, 825076499, oclc, 2012044047, lccn, 59327, 407, kids, governance, nathaniel, durbin, 8100, election, fairchild, carlie, stepping, role, lukewarm, brief, sultana, simon, reed, philip, curriculum, recommendations, academia, industry, 90023144, jstor, 1071, 6084, 21061, jots, v43i2, studies, kuhlman, dave, exercises, product, tireless, effort, experts, gurus, ninjas, incredibly, important, dogfooding, feedback, refine, battle, greatly, benefited, experiences, hard, won, field, drawing, objective, too, homepage, bini, ola, berkeley, apress, 59059, 881, practical, jruby, bringing, krill, marries, mlir, bezanson, jeff, karpinski, stefan, shah, viral, edelman, want, speaking, chapter, 2ality, demand, schemenauer, neil, hetland, magnus, 255, concise, notation, howto, simionato, michele, nothing, invented, people, described, paper, lispers, lundh, fredrik, replace, record, procedure, accurate, effbot, mixture, mechanisms, 1993, nluug, najaarsconferentie, ideal, influence, considerable, iterator, constructs, sml, andrew, spent, summer, dec, center, report, showed, fact, methods, came, amk, 1998, archive, adaic, manual, experience, implementing, lot, origin, grouping, inclusion, details, bazel, holth, daniel, moore, 0441, improving, hammond, console, 397, emma, stubs, ends, 561, distributing, packaging, ahlstrom, james, dll, 273, generated, startup, 488, pyo, venners, access, underlying, regression, 738, levkivskyi, ivan, 483, alt, surrounding, issue, behave, word, deallocate, heap, destructor, delete, come, retirement, titled, emeritus, raspberry, freebsd, wasi, webassembly, ignored, ren, setup, runs
Text of the page (random words):
d many of their features support functional programming and aspect oriented programming including metaprogramming 58 and metaobjects 59 many other paradigms are supported via extensions including design by contract 60 61 and logic programming 62 python is often referred to as a glue language 63 because it is purposely designed to be able to integrate components written in other languages python uses dynamic typing and a combination of reference counting and a cycle detecting garbage collector for memory management 64 it uses dynamic name resolution late binding which binds method and variable names during program execution python s design offers some support for functional programming in the lisp tradition it has filter map and reduce functions list comprehensions dictionaries sets and generator expressions 65 the standard library has two modules itertools and functools that implement functional tools borrowed from haskell and standard ml 66 python s core philosophy is summarized in the zen of python pep 20 written by tim peters which includes aphorisms such as these 67 explicit is better than implicit simple is better than complex readability counts special cases aren t special enough to break the rules although practicality beats purity errors should never pass silently unless explicitly silenced there should be one and preferably only one obvious way to do it however python has received criticism for violating these principles and adding unnecessary language bloat 68 responses to these criticisms note that the zen of python is a guideline rather than a rule 69 the addition of some new features had been controversial guido van rossum resigned as benevolent dictator for life after conflict about adding the assignment expression operator in python 3 8 70 71 nevertheless rather than building all functionality into its core python was designed to be highly extensible through modules this compact modularity has made it particularly popular as a means of adding programmable interfaces to existing applications van rossum s vision of a small core language with a large standard library and an easily extensible interpreter stemmed from his frustrations with abc which represented the opposite approach 11 python claims to strive for a simpler less cluttered syntax and grammar while giving developers a choice in their coding methodology python lacks do while loops which rossum considered harmful 72 in contrast to perl s motto there is more than one way to do it python advocates an approach where there should be one and preferably only one obvious way to do it 67 in practice however python provides many ways to achieve a given goal there are at least three ways to format a string literal with no certainty as to which one a programmer should use 73 alex martelli is a fellow at the python software foundation and python book author he wrote that to describe something as clever is not considered a compliment in the python culture 74 python s developers typically prioritize readability over performance for example they reject patches to non critical parts of the cpython reference implementation that would offer increases in speed that do not justify the cost of clarity and readability 75 failed verification execution speed can be improved by moving speed critical functions to extension modules written in languages such as c or by using a just in time compiler like pypy also it is possible to transpile to other languages however this approach either fails to achieve the expected speed up since python is a very dynamic language or only a restricted subset of python is compiled with potential minor semantic changes 76 python is meant to be a fun language to use 77 3 this goal is reflected in the name a tribute to the british comedy group monty python 78 and in playful approaches to some tutorials and reference materials for instance some code examples use the terms spam and eggs in reference to a monty python sketch rather than the typical terms foo and bar 77 79 a common neologism in the python community is pythonic which has a broad range of meanings related to program style pythonic code may use python idioms well be natural or show fluency in the language or conform with python s minimalist philosophy and emphasis on readability 80 enhancement proposals python enhancement proposals note 1 are a design document for either providing information to the python community or proposal for new feature in python 81 peps are intended to explain new processes in python provide naming conventions or document the processes in the language 82 peps are overseen by python steering council 82 there are 3 kinds of peps with those are being standards track pep note 2 informational pep note 3 and process pep s note 4 which has their own unique meanings 81 83 they were firstly introduced in 2000 inspired by other rfcs requests for comments and design enhancement proposals 83 most known peps are pep 1 pep 8 pep 20 pep 257 and others 83 syntax and semantics main article python syntax and semantics python is meant to be an easily readable language its formatting is visually uncluttered and often uses english keywords where other languages use punctuation unlike many other languages it does not use curly brackets to delimit blocks and semicolons after statements are allowed but rarely used it has fewer syntactic exceptions and special cases than c or pascal 84 indentation further information python syntax and semantics indentation python uses whitespace indentation rather than curly brackets or keywords to delimit blocks an increase in indentation comes after certain statements a decrease in indentation signifies the end of the current block 85 thus the program s visual structure accurately represents its semantic structure 86 this feature is sometimes termed the off side rule some other languages use indentation this way but in most indentation has no semantic meaning the recommended indent size is four spaces 87 statements and control flow python s statements include the following the assignment statement using a single equals sign the if statement which conditionally executes a block of code along with else and elif a contraction of else if the for statement which iterates over an iterable object capturing each element to a variable for use by the attached block the variable is not deleted when the loop finishes the while statement which executes a block of code as long as boolean condition is true the try statement which allows exceptions raised in its attached code block to be caught and handled by except clauses or new syntax except in python 3 11 for exception groups 88 the try statement also ensures that clean up code in a finally block is always run regardless of how the block exits the raise statement used to raise a specified exception or re raise a caught exception the class statement which executes a block of code and attaches its local namespace to a class for use in object oriented programming the def statement which defines a function or method the with statement which encloses a code block within a context manager allowing resource acquisition is initialization raii like behavior and replacing a common try finally idiom 89 examples of a context include acquiring a lock before some code is run and then releasing the lock or opening and then closing a file the break statement which exits a loop the continue statement which skips the rest of the current iteration and continues with the next the del statement which removes a variable deleting the reference from the name to the value and producing an error if the variable is referred to before it is redefined d the pass statement serving as a nop i e no operation which is syntactically needed to create an empty code block the assert statement used in debugging to check for conditions that should apply the yield statement which returns a value from a generator function and also an operator used to implement coroutines the return statement used to return a value from a function the import and from statements used to import modules whose functions or variables can be used in the current program python 3 15 adds a new functionality to lazily import with a new keyword the lazy keyword works with both import and from import statements 41 the match and case statements analogous to a switch statement construct which compares an expression against one or more cases as a control flow measure the assignment statement binds a name as a reference to a separate dynamically allocated object variables may subsequently be rebound at any time to any object in python a variable name is a generic reference holder without a fixed data type however it always refers to some object with a type this is called dynamic typing in contrast to statically typed languages where each variable may contain only a value of a certain type python does not support tail call optimization or first class continuations according to van rossum the language never will 90 91 however better support for coroutine like functionality is provided by extending python s generators 92 before 2 5 generators were lazy iterators data was passed unidirectionally out of the generator from python 2 5 on it is possible to pass data back into a generator function and from version 3 3 data can be passed through multiple stack levels 93 expressions python s expressions include the following the and operators for mathematical addition subtraction and multiplication are similar to other languages but the behavior of division differs there are two types of division in python floor division or integer division and floating point division 94 python uses the operator for exponentiation python uses the operator for string concatenation the language uses the operator for duplicating a string a specified number of times the infix operator is intended to be used by libraries such as numpy for matrix multiplication 95 96 the syntax called the walrus operator was introduced in python 3 8 this operator assigns values to variables as part of a larger expression 97 in python compares two objects by value python s is operator may be used to compare object identities i e comparison by reference and comparisons may be chained for example a b c python uses and or and not as boolean operators python has a type of expression called a list comprehension and a more general expression called a generator expression 65 anonymous functions are implemented using lambda expressions however there may be only one expression in each body conditional expressions are written as x if c else y 98 this is different in operand order from the c x y operator common to many other languages python makes a distinction between lists and tuples lists are written as 1 2 3 are mutable and cannot be used as the keys of dictionaries since dictionary keys must be immutable in python tuples written as 1 2 3 are immutable and thus can be used as the keys of dictionaries provided that all of the tuple s elements are immutable the operator can be used to concatenate two tuples which does not directly modify their contents but produces a new tuple containing the elements of both for example given the variable t initially equal to 1 2 3 executing t t 4 5 first evaluates t 4 5 which yields 1 2 3 4 5 this result is then assigned back to t thereby effectively modifying the contents of t while conforming to the immutable nature of tuple objects parentheses are optional for tuples in unambiguous contexts 99 python features sequence unpacking where multiple expressions each evaluating to something assignable e g a variable or a writable property are associated just as in forming tuple literal as a whole the results are then put on the left hand side of the equal sign in an assignment statement this statement expects an iterable object on the right hand side of the equal sign to produce the same number of values as the writable expressions on the left hand side while iterating the statement assigns each of the values produced on the right to the corresponding expression on the left 100 python has a string format operator that functions analogously to printf format strings in the c language e g spam s eggs d blah 2 evaluates to spam blah eggs 2 in python 2 6 and 3 this operator was supplemented by the format method of the str class e g spam 0 eggs 1 format blah 2 python 3 6 added f strings spam blah eggs 2 f spam spam eggs eggs 101 strings in python can be concatenated by adding them using the same operator as for adding integers and floats e g spam eggs returns spameggs if strings contain numbers they are concatenated as strings rather than as integers e g 2 2 returns 22 python supports string literals in several ways delimited by single or double quotation marks single and double quotation marks have equivalent functionality unlike in unix shells perl and perl influenced languages both marks use the backslash as an escape character string interpolation became available in python 3 6 as formatted string literals 101 triple quoted i e starting and ending with three single or double quotation marks this may span multiple lines and function like here documents in shells perl and ruby raw string varieties denoted by prefixing the string literal with r escape sequences are not interpreted hence raw strings are useful where literal backslashes are common such as in regular expressions and windows style paths compare quoting in c python has array index and array slicing expressions in lists which are written as a key a start stop or a start stop step indexes are zero based and negative indexes are relative to the end slices take elements from the start index up to but not including the stop index the optional third slice parameter called step or stride allows elements to be skipped or reversed slice indexes may be omitted for example a returns a copy of the entire list each element of a slice is a shallow copy in python a distinction between expressions and statements is rigidly enforced in contrast to languages such as common lisp scheme or ruby this distinction leads to duplicating some functionality for example list comprehensions vs for loops conditional expressions vs if blocks the eval vs exec built in functions in python 2 exec is a statement the former function is for expressions while the latter is for statements a statement cannot be part of an expression because of this restriction expressions such as list and dict comprehensions and lambda expressions cannot contain statements as a particular case an assignment statement such as a 1 cannot be part of the conditional expression of a conditional statement typing the standard type hierarchy in python 3 python uses duck typing and it has typed objects but untyped variable names type constraints are not checked at definition time rather operations on an object may fail at usage time indicating that the object is not of an appropriate type despite being dynamically...
|