[pypy-dev] Using PyPy as a compiler

Sanghyeon Seo sanxiyn at gmail.com
Tue Feb 8 05:41:57 CET 2005


On Mon, 7 Feb 2005 17:57:38 -0800 (PST), Hart's Antler
<bhartsho at yahoo.com> wrote:
> I've got the pypy compiler working! see the function at the bottom.
> But now i'm having some problems when importing the module and testing
> some of its functions.

Great!

> when i import the module and try isFloatingPoint(None, '0.001') it returns the error
> below, looks like it can not find 'contains' where does contain come from, should i
> have linked to another library when making the .so file?

No, you don't need to link another library. I think I have fixed this
one now. Update
and try again?

> >>> mod.isFloatingPoint(None, '0.001')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "b11a3ad330bf84c9dabf6b4e40ba4baa.pyx", line 806, in
> b11a3ad330bf84c9dabf6b4e40ba4baa.isFloatingPoint
>     return isFloatingPoint__2dbc1614(self_3077, s_3078)
>   File "b11a3ad330bf84c9dabf6b4e40ba4baa.pyx", line 833, in
> b11a3ad330bf84c9dabf6b4e40ba4baa.isFloatingPoint__2dbc1614
>     v3119 = contains('0123456789.', char_3145)
> NameError: contains
>
> def isFloatingPoint(self, s):
>         r = True
>         chars = '0123456789.'
>         for char in s:
>                 if char not in chars:
>                         return False
>         return r

Seo Sanghyeon



More information about the Pypy-dev mailing list