[Pyrex] More on enums in 0.9.5.1a
Lenard Lindstrom
len-l at telus.net
Wed Feb 7 02:14:12 UTC 2007
Greg Ewing wrote:
> Eric Huss wrote:
>
>
>> i = e + 1 # Fails.
>>
>
> Hmmm, it seems you're right, C++ allows this without
> warning, although it doesn't seem very useful. It
> would be more useful IMO to allow
>
> e = e + 1
>
> but that isn't allowed because the result is of type
> int instead of enum.
>
That wouldn't be allowed because (e + 1) could be an invalid value for
the enum.
--
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list