Does the function is_FreeModule() do what you want by any chance?

John

On May 28, 9:08 pm, VictorMiller <[email protected]> wrote:
> I'm writing some code, and I'd like to test if a the value of a
> variable, say M, is an instance of an element of a FreeModule(F,n) for
> some F and n.  If this weren't a parametrized class I could write
>
> if isinstance(M,C):
>    # do stuff here
>
> However doing
>
> if isinstance(M,FreeModule):
>    # do stuff here
>
> doesn't work because FreeModule isn't a class or a type.  So how do I
> do this?  And, then if it passes that test, how do I extract the F and
> n (the two arguments to FreeModule)?
>
> Victor

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to