On 2007-09-11, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> Perhaps Ben should have followed the usual practice of
> commercial, closed- source software developers and started
> counting his version numbers at one instead of zero, miss a few
> releases, use randomly large increments occasionally, a
On Mon, 10 Sep 2007 18:03:11 -0700, TheFlyingDutchman wrote:
>> I'd like to know if the Cheeseshop package 'enum' is useful to you. Any
>> constructive feedback would be appreciated.
>>
>> http://cheeseshop.python.org/pypi/enum/>
>
> Looking at the documentation it looks excellent. But I don'
[EMAIL PROTECTED] wrote:
> Hi,
>
> I have the following class -
>
> class TestOutcomes:
> PASSED = 0
> FAILED = 1
> ABORTED = 2
>
> plus the following code -
>
> testResult = TestOutcomes.PASSED
>
> testResultAsString
> if testResult == TestOutcomes.PASSED:
> testResultAsStrin
Zara wrote:
> On Mon, 10 Sep 2007 02:28:57 -0700, [EMAIL PROTECTED] wrote:
>
>
>> Hi,
>>
>> I have the following class -
>>
>> class TestOutcomes:
>>PASSED = 0
>>FAILED = 1
>>ABORTED = 2
>>
>> plus the following code -
>>
>> testResult = TestOutcomes.PASSED
>>
>> testResultAsString
>
TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> On Sep 10, 7:55 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> > Uh... The 1.0 version is vaporware?
>
> I think not. 42% of it is alive and kicking as we speak.
That's odd. Do you think some similar matchematical relationship
exists between Pyth
On Mon, 10 Sep 2007 02:28:57 -0700, [EMAIL PROTECTED] wrote:
>Hi,
>
>I have the following class -
>
>class TestOutcomes:
>PASSED = 0
>FAILED = 1
>ABORTED = 2
>
>plus the following code -
>
>testResult = TestOutcomes.PASSED
>
>testResultAsString
>if testResult == TestOutcomes.PASSED:
>
On Sep 10, 7:55 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> TheFlyingDutchman wrote:
> > On Sep 10, 7:12 pm, Ben Finney <[EMAIL PROTECTED]>
> > wrote:
> >> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> http://cheeseshop.python.org/pypi/enum/>
> >> (Please preserve attribution lines so
On Sep 10, 8:02 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> > On Sep 10, 7:12 pm, Ben Finney <[EMAIL PROTECTED]>
> > wrote:
> > > TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> > > > Looking at the documentation it looks excellent. But I don't
> > >
TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> On Sep 10, 7:12 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> > > Looking at the documentation it looks excellent. But I don't
> > > understand the 0.4.2 version number,
> >
> > Note the tag that says
TheFlyingDutchman wrote:
> On Sep 10, 7:12 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
>> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
http://cheeseshop.python.org/pypi/enum/>
>> (Please preserve attribution lines so it's clear who wrote what.)
>>
>>
>>> Looking at the documentation it look
On Sep 10, 7:12 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> > > http://cheeseshop.python.org/pypi/enum/>
>
> (Please preserve attribution lines so it's clear who wrote what.)
>
> > Looking at the documentation it looks excellent. But I don't
> > u
TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> > http://cheeseshop.python.org/pypi/enum/>
(Please preserve attribution lines so it's clear who wrote what.)
> Looking at the documentation it looks excellent. But I don't
> understand the 0.4.2 version number,
Note the tag that says the "Deve
TheFlyingDutchman a écrit :
> On Sep 8, 9:52 am, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>>TheFlyingDutchman a écrit :
(snip)
>>>class TestOutcomes:
>>>PASSED = 0
>>>FAILED = 1
>>>ABORTED = 2
>>
>>>def ToString(outcome):
>>>if outcome == TestOutcomes.PASSED:
>>>
>
> I'd like to know if the Cheeseshop package 'enum' is useful to
> you. Any constructive feedback would be appreciated.
>
> http://cheeseshop.python.org/pypi/enum/>
Looking at the documentation it looks excellent. But I don't
understand the 0.4.2 version number, particularly when you refer
[EMAIL PROTECTED] writes:
> But it would be much nicer if I had a function to covert to string
> as part of the TestOutcomes class. How would I implement this?
Others have given ad hoc implementations that may do what you want.
I'd like to know if the Cheeseshop package 'enum' is useful to
you.
On Sep 8, 9:52 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> TheFlyingDutchman a écrit :
>
>
>
> > On Sep 10, 2:28 am, [EMAIL PROTECTED] wrote:
>
> >>Hi,
>
> >>I have the following class -
>
> >>class TestOutcomes:
> >>PASSED = 0
> >>FAILED = 1
> >>ABORTED = 2
>
> >>plus the foll
TheFlyingDutchman a écrit :
> On Sep 10, 2:28 am, [EMAIL PROTECTED] wrote:
>
>>Hi,
>>
>>I have the following class -
>>
>>class TestOutcomes:
>>PASSED = 0
>>FAILED = 1
>>ABORTED = 2
>>
>>plus the following code -
>>
>>testResult = TestOutcomes.PASSED
>>
>>testResultAsString
>>if testR
[EMAIL PROTECTED] wrote:
> I have the following class -
>
> class TestOutcomes:
> PASSED = 0
> FAILED = 1
> ABORTED = 2
>
> plus the following code -
>
> testResult = TestOutcomes.PASSED
>
> testResultAsString
> if testResult == TestOutcomes.PASSED:
> testResultAsString = "Pas
On Sep 10, 2:28 am, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have the following class -
>
> class TestOutcomes:
> PASSED = 0
> FAILED = 1
> ABORTED = 2
>
> plus the following code -
>
> testResult = TestOutcomes.PASSED
>
> testResultAsString
> if testResult == TestOutcomes.PASSED:
> te
On 9/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following class -
>
> class TestOutcomes:
> PASSED = 0
> FAILED = 1
> ABORTED = 2
>
> plus the following code -
>
> testResult = TestOutcomes.PASSED
>
> testResultAsString
> if testResult == TestOutcomes.PASS
On 10 Sep, 13:35, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
> On Sep 10, 2:28 am, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > Hi,
>
> > I have the following class -
>
> > class TestOutcomes:
> > PASSED = 0
> > FAILED = 1
> > ABORTED = 2
>
> > plus the following code -
>
> > testResult = T
On Sep 10, 2:28 am, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have the following class -
>
> class TestOutcomes:
> PASSED = 0
> FAILED = 1
> ABORTED = 2
>
> plus the following code -
>
> testResult = TestOutcomes.PASSED
>
> testResultAsString
> if testResult == TestOutcomes.PASSED:
> te
[EMAIL PROTECTED] wrote:
> But it would be much nicer if I had a function to covert to string as
> part of the TestOutcomes class. How would I implement this?
Perhaps: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413486
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have the following class -
class TestOutcomes:
PASSED = 0
FAILED = 1
ABORTED = 2
plus the following code -
testResult = TestOutcomes.PASSED
testResultAsString
if testResult == TestOutcomes.PASSED:
testResultAsString = "Passed"
elif testResult == TestOutcomes.FAILED :
24 matches
Mail list logo