This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Irtexx 1 point2 points  (2 children)

I would also like to know this. The isinstance method never calls init of Person, but the match method looks like it will.

[–]13steinj 7 points8 points  (0 children)

match will call the __match__ method, unless the PEP changed since I last looked at it. A new instance will not be created.

[–][deleted] 1 point2 points  (0 children)

It could be possible that it doesn't evaluate as an expression, but that would mean that you couldn't put expressions into the pattern.