[issue44341] Conflict between re.match and match keyword

2021-06-07 Thread Finn Mason
New submission from Finn Mason : >>> import re >>> re.match('str', 'str').group() 'str' >>> match 'str': ... case 'str': ... print('match!') ... match! >>> from re import match >&g

[issue44341] Conflict between re.match and match keyword

2021-06-07 Thread Finn Mason
Change by Finn Mason : -- nosy: -finnjavier08 ___ Python tracker <https://bugs.python.org/issue44341> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44941] Add check_methods function to standard library

2021-08-17 Thread Finn Mason
New submission from Finn Mason : In _collections_abc.py is a private function titled `_check_methods`. It takes a class and a number of method names (as strings), checks if the class has all of the methods, and returns NotImplemented if any are missing. The code is below: ``` def

[issue44941] Add check_methods function to standard library

2021-08-18 Thread Finn Mason
Finn Mason added the comment: I strongly feel that `check_methods` shouldn't be in collections.abc, even though that's where it's originally found, because it's not related specifically to collections but to ABCs and classes in general. I would prefer for it to be imp

[issue44941] Add check_methods function to standard library

2021-08-20 Thread Finn Mason
Finn Mason added the comment: Thank you for the suggestions. >From what I could tell, the cited python-ideas discussion was more about >checking the signature of a method. However, an issue cited by the ex-BDFL >(issue9731) was helpful. It's a similar idea that verifie