Re: [pypy-dev] [pypy-commit] pypy sepcomp2: Functions can be @exported without specifying argument types,
Hi Amaury, On 02/22/2012 12:34 AM, amauryfa wrote:
Author: Amaury Forgeot d'Arc<amauryfa@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
2012/2/23 Antonio Cuni <anto.cuni@gmail.com>
Hi Amaury,
On 02/22/2012 12:34 AM, amauryfa wrote:
Author: Amaury Forgeot d'Arc<amauryfa@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
participants (2)
-
Amaury Forgeot d'Arc -
Antonio Cuni