[pypy-dev] [pypy-commit] pypy sepcomp2: Functions can be @exported without specifying argument types,

Amaury Forgeot d'Arc amauryfa at gmail.com
Thu Feb 23 13:54:06 CET 2012


2012/2/23 Antonio Cuni <anto.cuni at gmail.com>

> Hi Amaury,
>
> On 02/22/2012 12:34 AM, amauryfa wrote:
>
>> Author: Amaury Forgeot d'Arc<amauryfa at gmail.com>
>> Branch: sepcomp2
>> Changeset: r52748:ce2d7e8a1b42
>> Date: 2012-02-21 23:28 +0100
>> http://bitbucket.org/pypy/**pypy/changeset/ce2d7e8a1b42/<http://bitbucket.org/pypy/pypy/changeset/ce2d7e8a1b42/>
>>
>
>  +    def test_implied_signature(self):
>> +        @export  # No explicit signature here.
>> +        def f(x):
>> +            return x + 1.5
>> +        @export()  # This is an explicit signature, with no argument.
>> +        def f2():
>> +            f(1.0)
>>
>
>
> what about using @export(implicit=True) or something like that? Else
> @export and @export() are too easy to confound, IMHO.
>

That's right. I'll change it to @export_auto, unless someone has a better
name.

-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120223/7d8cbd1c/attachment.html>


More information about the pypy-dev mailing list