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

Antonio Cuni anto.cuni at gmail.com
Thu Feb 23 12:01:57 CET 2012


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/

> +    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.

ciao,
Anto


More information about the pypy-dev mailing list