Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pari(string) always returns a value, even when it should not #9661

Closed
jdemeyer opened this issue Aug 1, 2010 · 9 comments
Closed

pari(string) always returns a value, even when it should not #9661

jdemeyer opened this issue Aug 1, 2010 · 9 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Aug 1, 2010

When executing a PARI command from Sage, a value of 0 is returned when None would be expected. For example, in a gp shell (say, started with sage -gp):

gp> kill(x)   /* No output */

But in Sage:

sage: pari('kill(x)')
0

It should be possible to fix this by checking for gnil (PARI's concept of None) as return value.

Component: interfaces

Author: Jeroen Demeyer

Reviewer: John Cremona

Merged: sage-4.5.3.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/9661

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title pari(string) and gp(string) always returns a value, even when it should not pari(string) always returns a value, even when it should not Aug 1, 2010
@jdemeyer
Copy link
Author

jdemeyer commented Aug 2, 2010

Attachment: 9661.patch.gz

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer assigned jdemeyer and unassigned williamstein Aug 2, 2010
@jdemeyer
Copy link
Author

jdemeyer commented Aug 2, 2010

Author: Jeroen Demeyer

@JohnCremona
Copy link
Member

comment:5

I'm testing this now on 4.5.2.rc0. Can you say why you included _sig_off ? (I do not claim to understand how Sage/pari signal handling works.) Without this patch there is a return with no _sig_off (unless the call to new_gen does that.)

@JohnCremona
Copy link
Member

comment:6

Tests all pass on 4.5.2.rc0 (64-bit ubuntu).

@jdemeyer
Copy link
Author

jdemeyer commented Aug 3, 2010

comment:7

Replying to @JohnCremona:

I'm testing this now on 4.5.2.rc0. Can you say why you included _sig_off ? (I do not claim to understand how Sage/pari signal handling works.) Without this patch there is a return with no _sig_off (unless the call to new_gen does that.)

It's exactly as you say, new_gen() calls _sig_off.

@jdemeyer jdemeyer modified the milestones: sage-4.6, sage-4.5.3 Aug 3, 2010
@qed777
Copy link
Mannequin

qed777 mannequin commented Aug 9, 2010

Merged: sage-4.5.3.alpha0

@qed777
Copy link
Mannequin

qed777 mannequin commented Aug 9, 2010

Reviewer: John Cremona

@qed777 qed777 mannequin removed the s: positive review label Aug 9, 2010
@qed777 qed777 mannequin closed this as completed Aug 9, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants