HTMLWindow or HtmlWindow or perhaps HTMLwindo

Krister Svanlund krister.svanlund at gmail.com
Mon Nov 15 15:22:23 EST 2010


On Mon, Nov 15, 2010 at 9:09 PM, Ben James <bmjames at gmail.com> wrote:
> On 15/11/2010 19:53, Boštjan Mejak wrote:
>>
>> Hello, I am wondering which of the 3 class names are prefered by PEP-8?
>>
>> class HTMLWindow(...)
>>
>> class HtmlWindow(...)
>>
>> class HTMLwindow(...)
>>
>>
>> Thank you for your answer in advance.
>
> PEP 8 says:
>
>    Note: When using abbreviations in CapWords, capitalize all the
>    letters of the abbreviation.  Thus HTTPServerError is better than
>    HttpServerError.
>
> So, to apply that to your example, PEP 8 recommends HTMLWindow.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Yeah, since HTML is an abbreviation it's the exact recommendation to use... :)



More information about the Python-list mailing list