CEPort: I Need help with compile.c bug
Michael Hudson
mwh at python.net
Sun Dec 30 16:41:14 EST 2001
"Brad Clements" <bkc at Murkworks.com> writes:
> Sorry to post here, but I'm trying to figure out where in the 2.2 code to
> look to solve this problem.
>
> I'm porting the release22-maint CVS checkout to CE 3.0
>
> Seems to work okay, except that many of the regression tests fail because
> the CE port is casting numbers to long somewhere... so numeric output has L
> at end.
>
> I'm looking for a suggestion where to look in the code. It's on input, not
> output, that the problem is occuring. I'm looking at the diffs and nothing
> seems to stick out. Thanks for any suggestions..
Well, I'm baffled too. My only suggestions are for more things to try.
> Here's an example on CE 3.0
>
> >>> import dis
> >>> def a(): x = 1
> >>> dis.dis(a)
> 0L SET_LINENO 1L
>
> 3L SET_LINENO 1L
> 6L LOAD_CONST 1L (1L)
> 9L STORE_FAST 0L (x)
> 12L LOAD_CONST 0L (None)
> 15L RETURN_VALUE
>
> >>> x = 1
> >>> type(x)
> <type 'long'>
> >>>
Try these?
ord('a')
type(ord('a'))
int("1")
type(int("1"))
eval("1")
type(eval("1"))
Cheers,
M.
More information about the Python-list
mailing list