267 matching pages, found in 207 ms

Ask StyxWritten on your GPU machine; takes a few seconds the first time.

  1. peps.python.orghttps://peps.python.org › pep-0235
    More about peps.python.org
    PEP 235 – Import on Case-Insensitive Platforms | peps.python.org

    … import any but the first case-insensitive match on sys.path , and then only if case matches exactly in the first case-insensitive match. An ugly exception: if the first case-insensitive match …

    0 points
  2. peps.python.orghttps://peps.python.org › pep-0636
    More about peps.python.org
    PEP 636 – Structural Pattern Matching: Tutorial | peps.python.org

    … interpret action, obj The match statement will check patterns from top to bottom. If the pattern doesn’t match the subject, the next pattern will be tried. However, once the first matching pattern …

    0 points
  3. peps.python.orghttps://peps.python.org › pep-0634
    More about peps.python.org
    PEP 634 – Structural Pattern Matching: Specification | peps.python.org

    … when trying until the first failure, the bindings are merged. Several more rules, explained below, apply to these cases. The Match Statement Syntax: match_stmt: "match" subject_expr ':' NEWLINE INDENT case_block …

    0 points
  4. peps.python.orghttps://peps.python.org › pep-0635
    More about peps.python.org
    PEP 635 – Structural Pattern Matching: Motivation and Rationale | peps.python.org

    … binding in patterns. The Match Statement The match statement evaluates an expression to produce a subject, finds the first pattern that matches the subject, and executes the associated block of code. Syntactically …

    0 points
  5. peps.python.orghttps://peps.python.org › pep-0230
    More about peps.python.org
    PEP 230 – Warning Framework | peps.python.org

    … exceptions “ignore” – never print matching warnings “always” – always print matching warnings “default” – print the first occurrence of matching warnings for each location where the warning is issued “module” – print the first occurrence …

    0 points
  6. peps.python.orghttps://peps.python.org › pep-0622
    More about peps.python.org
    PEP 622 – Structural Pattern Matching | peps.python.org

    … the pattern’s 0 . The match statement tries to match a single subject to each of the patterns in its case clauses. At the first successful match to a pattern in a case …

    0 points
  7. peps.python.orghttps://peps.python.org › pep-0642
    More about peps.python.org
    PEP 642 – Explicit Pattern Syntax for Structural Pattern Matching | peps.python.org

    PEP 642 – Explicit Pattern Syntax for Structural Pattern Matching PEP 642 – Explicit Pattern Syntax for Structural Pattern Matching Author : Alyssa Coghlan <ncoghlan at gmail.com> BDFL-Delegate : Discussions-To : Python-Dev list Status …

    0 points
  8. peps.python.orghttps://peps.python.org › pep-0455
    More about peps.python.org
    PEP 455 – Adding a key-transforming dictionary to collections | peps.python.org

    … respondents found retaining the first user-supplied key more intuitive than retaining the last. Also, it matches the dict object’s own behaviour when using different but equal keys: >>> d = {} >>> d [ 1 ] = 'hello …

    0 points
  9. peps.python.orghttps://peps.python.org › pep-0572
    More about peps.python.org
    PEP 572 – Assignment Expressions | peps.python.org

    … e.g. instead of writing: match = re . match ( data ) group = match . group ( 1 ) if match else None they would write: group = re . match ( data ) . group ( 1 ) if re . match ( data ) else None Another …

    0 points
  10. peps.python.orghttps://peps.python.org › pep-0845
    More about peps.python.org
    PEP 845 – Leading-Dot Value Patterns | peps.python.org

    … developers new to the match statement might find it difficult to come up with it at first. The guard clause is separate from the value pattern . For deeply nested patterns, this increases …

    0 points

Search for “First Match site:peps.python.org” on Google, or add !ddg, !w and other shortcuts to any search.