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
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:
> >>
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
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
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
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
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
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