On Tue, Aug 5, 2008 at 1:11 PM, Dag Sverre Seljebotn
<[EMAIL PROTECTED]> wrote:
> Lisandro Dalcin wrote:
>> It is not to much at all. I would even ask for '1' and '0' also being
>> accepted for booleans.
>
> I'm going to side with Stefan here and tighten it up: "here should be one—
> and preferably only one —obvious way to do it."
>
> So so far it stands +2 to True/False in source and allow yes/no on command
> line as well, and +1 for keeping it as it is but add 1 and 0 as well.

I was not clear enough. For the command line, accept all of true,false
| yes/no | 1,0 . For souce code, I can live with just True/False, but
remember that using 1 and 0 for booleans is frequent in Python code,
though I realize that such usages could be considered a bit dated and
should be discouraged.


>>> b) A command line argument "cython -O boundscheck=False,other=tRUe -O
>>> third=yes". This overrides the #cython comments, but NOT c) and d)
>>> listed below.
>>
>> Well, '-O' smells to 'optimization' for me.
>
> True. Then again, most of the options will be optimization-related.
>
> Any other suggestions? -d or -D for directive perhaps, if they are not
> taken. -D means #define in C of course...

Well, I'm not sure. Perhaps '-O' was a good idea after all.


>> I really prefer the decorator form. The 'with' form could require a
>> lot of identation if you want to set a lot for options.
>
> Well, then you use the decorator form in your code.
>
> Hopefully we can have class decorators as well though.
>

OK, That's great. I missunderstood you.



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to