Re: [Cython] bint and autodoc signatures

2013-04-16 Thread Robert Bradshaw
On Sun, Apr 14, 2013 at 2:49 AM, Stefan Behnel  wrote:
> Nikita Nemkin, 14.04.2013 11:33:
>> Arguments, return values and properties of type 'bint'
>> appear as 'int' in autogenerated signatures.
>>
>> This is very confusing for the end user and logically wrong.
>> (For one thing, bint and int handle input arguments differently:
>> bint accepts pretty much any Python object, while int requries
>> something numeric.)
>
> +1
>
>
>> Would it be acceptable to change bint display presentation
>> to 'bool' ?
>>
>> Note: other primitive types (short, int, float, long long etc)
>> don't have this problem, because they are all numeric
>> and coerce to/from Python numerics in an obvious way.
>
> The problem I see with "bool" is that it would still be different from,
> say, "list" or "MyExtType". Where the latter only accept that type and
> reject anything else with a TypeError, "bool" would accept any object and
> do a conversion instead. So "bool x" isn't correct either.
>
> I'm also not sure if "bint" is a good idea as normal Python users won't
> know it, so it's just as confusing as "int".

But it would encourage users to look it; they wouldn't assume they
know what it means.

> That being said, I guess I would find it less confusing to read
>
>"def func(x : bool)"
>
> than
>
>"def func(bool x)"
>
> as signature description in a docstring. So maybe that's the way to go
> eventually.

Much better than int. It's not that bad if the documented signature is
a bit stricter than reality, especially as the coercion is obvious.

- Robert
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] [cython-users] Cython 0.19 beta 2 released

2013-04-16 Thread Robert Bradshaw
It'd be really good to get in two last-minute changes uncovered by Sage

https://github.com/cython/cython/pull/214
https://github.com/cython/cython/pull/215

On Fri, Apr 12, 2013 at 5:16 AM, Stefan Behnel  wrote:
> Hi,
>
> I uploaded a second (and hopefully last) beta release for Cython 0.19.
> Please give it a try with your code.
>
> http://cython.org/release/Cython-0.19b2.tar.gz
>
> http://cython.org/release/Cython-0.19b2.zip
>
>
> Cython 0.19 features many enhancements and changes regarding performance,
> usability and Python compatibility, including some very long standing bugs
> and issues. The changelog is on github:
>
> https://github.com/cython/cython/blob/58131b68dc033fc7ca269d875a2aab2b4e9646a2/CHANGES.rst
>
>
> The latest documentation is here:
>
> https://sage.math.washington.edu:8091/hudson/job/cython-docs/doclinks/1/
>
>
> Have fun,
>
> Stefan
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "cython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cython-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel