[pypy-dev] Strange annotation problem.
Amaury Forgeot d'Arc
amauryfa at gmail.com
Mon Jul 23 11:28:52 CEST 2007
Hello,
Maciek Fijalkowski wrote:
> Discovered by exarkun. following diff breaks translation
>
> :.
>
>
> Index: ../../module/posix/__init__.py
> ===================================================================
> --- ../../module/posix/__init__.py (revision 45246)
> +++ ../../module/posix/__init__.py (working copy)
> @@ -83,6 +83,9 @@
> # interpleveldefs['uname'] = 'interp_posix.uname'
> if hasattr(os, 'ttyname'):
> interpleveldefs['ttyname'] = 'interp_posix.ttyname'
> + if hasattr(os, 'setsid'):
> + interpleveldefs['xxx'] = 'interp_posix.xxx'
> +
> for name in w_star:
> if hasattr(os, name):
> interpleveldefs[name] = 'interp_posix.' + name
> Index: ../../module/posix/interp_posix.py
> ===================================================================
> --- ../../module/posix/interp_posix.py (revision 45246)
> +++ ../../module/posix/interp_posix.py (working copy)
> @@ -499,6 +499,22 @@
> raise OperationError(space.w_TypeError, space.wrap(msg))
> utime.unwrap_spec = [ObjSpace, str, W_Root]
>
> +def xxx(space):
> + """xxx() -> pid
> +
> + Stuff
> + """
> + return 3
> +xxx.unwrap_spec = [ObjSpace]
> +
The function seems to return an unwrapped object.
does it behave better if you replace the return value with
something like space.wrap(3) ?
--
Amaury Forgeot d'Arc
More information about the Pypy-dev
mailing list