homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Gregory.Salvan
Recipients Gregory.Salvan
Date 2014年08月24日.22:17:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408918667.95.0.696624554898.issue22268@psf.upfronthosting.co.za>
In-reply-to
Content
It's a small refactoring.
Lurking at collections.abc I found a lot of: 
>>> any(attr in B.__dict__ for B in C.__mro__)
also repeated in typing.py of mypy:
https://github.com/JukkaL/mypy/blob/master/lib-typing/3.2/typing.py#L117
It seems to be a common operation to check or get an attribute from mro in abc, so I thought it could help to have dedicated functions to enhance readability.
(see patch e.g. Hash.__subclasshook__ takes 1 line intead of 7...)
History
Date User Action Args
2014年08月24日 22:17:48Gregory.Salvansetrecipients: + Gregory.Salvan
2014年08月24日 22:17:47Gregory.Salvansetmessageid: <1408918667.95.0.696624554898.issue22268@psf.upfronthosting.co.za>
2014年08月24日 22:17:47Gregory.Salvanlinkissue22268 messages
2014年08月24日 22:17:47Gregory.Salvancreate

AltStyle によって変換されたページ (->オリジナル) /