Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.14] gh-88275: Add missing__init__ method tomatch example (GH-120281)#134142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
picnixz merged 1 commit intopython:3.14frommiss-islington:backport-7a9d462-3.14
May 17, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-88275: Add missing__init__ method tomatch example (GH-120281)
(cherry picked from commit7a9d462)Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
  • Loading branch information
@Eclips4@miss-islington
Eclips4 authored andmiss-islington committedMay 17, 2025
commit0faa0bc294e66f8ba1a81302621a43fef2825f9b
7 changes: 4 additions & 3 deletionsDoc/whatsnew/3.10.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -551,11 +551,12 @@ Patterns and classes

If you are using classes to structure your data, you can use as a pattern
the class name followed by an argument list resembling a constructor. This
pattern has the ability to captureclass attributes into variables::
pattern has the ability to captureinstance attributes into variables::

class Point:
x: int
y: int
def __init__(self, x, y):
self.x = x
self.y = y

def location(point):
match point:
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp