sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.39k stars 473 forks source link

Showing source from sloane_functions #2491

Closed jaapspies closed 16 years ago

jaapspies commented 16 years ago

From IRC #sage-devel

<mhansen> jaap: There's a difference between sloane.A000001?? and sage.combinat.sloane_functions.A000001??
<jaap> mhansen sage: sloane.A000001??
<jaap> Error getting source: arg is not a module, class, method, function, traceback, frame, or code object
<mhansen> jaap: A bit earlier I had said that  sloane.A000001?? doesn't work because of the way the sloane object works.
<jaap> ok, but how about the OEIS user who wants to see how things work?
<mhansen> If it's a bug, then it should be reported.
<jaap> I think so
sage: sloane.A000045
 Fibonacci numbers with index n >= 0

sage: sloane.A000045?

sage: sloane.A000045??
Error getting source: arg is not a module, class, method, function, traceback, frame, or code object

sage: sage.combinat.sloane_functions.A000045??

works ok.

CC: @sagetrac-sage-combinat

Component: combinatorics

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

williamstein commented 16 years ago
comment:1

sage: sloane.A000045?? Error getting source: arg is not a module, class, method, function, traceback, frame, or code object

That this doesn't work should be considered a bug. The actual introspection is simply some python code I wrote, so it's fixable. Nick also knows something about it.

mwhansen commented 16 years ago

Attachment: trac_2491.patch.gz

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:3

Positive review. Works for me.

Cheers,

Michael

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:4

Merged in Sage 3.1.2.alpha1