Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documenting class attribute

Tags:

Following sample is taken from "Dive into python" book.

class MP3FileInfo(FileInfo):
    "store ID3v1.0 MP3 tags"
    tagDataMap = ...

This sample shows documenting the MP3FileInfo, but how can I add help to MP3FileInfo. tagDataMap

like image 687
Dewfy Avatar asked Aug 28 '09 15:08

Dewfy


1 Answers

The PEP 224 on attribute docstrings was rejected (long time ago), so this is a problem for me as well, sometimes I don't know to choose a class attribute or an instance property -- the second can have a docstring.

like image 187
u0b34a0f6ae Avatar answered Sep 20 '22 13:09

u0b34a0f6ae