Re: Like c enumeration in python3 [ERRATA]

2020-03-23 Thread Terry Reedy
On 3/22/2020 11:37 PM, DL Neil via Python-list wrote: On 23/03/20 3:32 PM, Paulo da Silva wrote: Às 02:18 de 23/03/20, Paulo da Silva escreveu: Hi! Olá, Suppose a class C. I want something like this: class C: KA=0 KB=1 KC=2 ... Kn=n def __init__ ...     ...

Re: Like c enumeration in python3 [ERRATA]

2020-03-23 Thread Peter Otten
Paulo da Silva wrote: > Às 02:18 de 23/03/20, Paulo da Silva escreveu: >> Hi! >> >> Suppose a class C. >> I want something like this: >> >> class C: >> KA=0 >> KB=1 > KC=2 >> ... >> Kn=n >> >> def __init__ ... >> ... >> >> >> These constants come from an enum in a .h (header of C file). >> Th

Re: Like c enumeration in python3 [ERRATA]

2020-03-22 Thread DL Neil via Python-list
On 23/03/20 3:32 PM, Paulo da Silva wrote: Às 02:18 de 23/03/20, Paulo da Silva escreveu: Hi! Olá, Suppose a class C. I want something like this: class C: KA=0 KB=1 KC=2 ... Kn=n def __init__ ... ... These constants come

Re: Like c enumeration in python3 [ERRATA]

2020-03-22 Thread Paulo da Silva
Às 02:18 de 23/03/20, Paulo da Silva escreveu: > Hi! > > Suppose a class C. > I want something like this: > > class C: > KA=0 > KB=1 KC=2 > ... > Kn=n > > def __init__ ... > ... > > > These constants come from an enum in a .h (header of C fil