A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-February/061784.html below:

[Python-Dev] Pre-PEP: The "bytes" object

[Python-Dev] Pre-PEP: The "bytes" object [Python-Dev] Pre-PEP: The "bytes" objectMichael Hoffman hoffman at ebi.ac.uk
Fri Feb 24 10:33:37 CET 2006
[Neil Schemenauer]
>>     @classmethod
>>     def fromhex(self, data):
>>         data = re.sub(r'\s+', '', data)
>>         return bytes(binascii.unhexlify(data))

[Jason Orendorff]
> If it's to be a classmethod, I guess that should be "return self(
> binascii.unhexlify(data))".

Am I the only one who finds the use of "self" on a classmethod to be
incredibly confusing? Can we please follow PEP 8 and use "cls"
instead?
-- 
Michael Hoffman <hoffman at ebi.ac.uk>
European Bioinformatics Institute

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4