Re: Docstrings for class attributes

2008-09-23 Thread Steven D'Aprano
On Tue, 23 Sep 2008 15:23:35 +1000, Tom Harris wrote: > Greetings, > > I want to have a class as a container for a bunch of symbolic names for > integers, eg: > > class Constants: > FOO = 1 > BAR = 2 > > Except that I would like to attach a docstring text to the constants, so > that hel

Re: Docstrings for class attributes

2008-09-23 Thread George Sakkis
On Sep 23, 3:55 pm, Gerard flanagan <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > On Sep 23, 1:23 am, "Tom Harris" <[EMAIL PROTECTED]> wrote: > > >> Greetings, > > >> I want to have a class as a container for a bunch of symbolic names > >> for integers, eg: > > >> class Constants: > >>

Re: Docstrings for class attributes

2008-09-23 Thread Gerard flanagan
George Sakkis wrote: On Sep 23, 1:23 am, "Tom Harris" <[EMAIL PROTECTED]> wrote: Greetings, I want to have a class as a container for a bunch of symbolic names for integers, eg: class Constants: FOO = 1 BAR = 2 Except that I would like to attach a docstring text to the constants, so

Re: Docstrings for class attributes

2008-09-23 Thread Terry Reedy
Peter Pearson wrote: On Tue, 23 Sep 2008 15:23:35 +1000, Tom Harris <[EMAIL PROTECTED]> wrote: I want to have a class as a container for a bunch of symbolic names for integers, eg: class Constants: FOO = 1 BAR = 2 Except that I would like to attach a docstring text to the constants, so

Re: Docstrings for class attributes

2008-09-23 Thread George Sakkis
On Sep 23, 1:23 am, "Tom Harris" <[EMAIL PROTECTED]> wrote: > Greetings, > > I want to have a class as a container for a bunch of symbolic names > for integers, eg: > > class Constants: > FOO = 1 > BAR = 2 > > Except that I would like to attach a docstring text to the constants, > so that

Re: Docstrings for class attributes

2008-09-23 Thread Peter Pearson
On Tue, 23 Sep 2008 15:23:35 +1000, Tom Harris <[EMAIL PROTECTED]> wrote: > > I want to have a class as a container for a bunch of symbolic names > for integers, eg: > > class Constants: > FOO = 1 > BAR = 2 > > Except that I would like to attach a docstring text to the constants, > so that

Re: Docstrings for class attributes

2008-09-23 Thread Diez B. Roggisch
Tom Harris wrote: > Greetings, > > I want to have a class as a container for a bunch of symbolic names > for integers, eg: > > class Constants: > FOO = 1 > BAR = 2 > > Except that I would like to attach a docstring text to the constants, > so that help(Constants.FOO) will print some arb

Re: Docstrings for class attributes

2008-09-23 Thread Bruno Desthuilliers
Tom Harris a écrit : Greetings, I want to have a class as a container for a bunch of symbolic names for integers, eg: class Constants: FOO = 1 BAR = 2 Do you have a reason to stuff them in a class ? Usually, putting them at the top level of a module is quite enough... Except that