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

improve import_statements #12543

Closed
anneschilling opened this issue Feb 20, 2012 · 8 comments
Closed

improve import_statements #12543

anneschilling opened this issue Feb 20, 2012 · 8 comments

Comments

@anneschilling
Copy link

Currently, import_statements yields a name error if the class is not
imported in the Sage interpreter namespace. For example.

   sage: import_statements(ClonableIntArray)
   NameError: name 'ClonableIntArray' is not defined

With this patch, one can specify the object as a string, and the object
is looked up in all (imported) Sage modules.

    sage: import_statements("ClonableIntArray")

See the documentation for more examples.

This patch implements several heuristics to better handle ambiguous
names.

CC: @sagetrac-sage-combinat

Component: misc

Keywords: import_statements, development

Author: Vincent Delecroix

Reviewer: Nicolas M. Thiéry

Merged: sage-5.8.beta3

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

@videlec
Copy link
Contributor

videlec commented Jan 27, 2013

Changed author from Nicolas Thiery to Vincent Delecroix

@videlec
Copy link
Contributor

videlec commented Jan 27, 2013

Changed keywords from none to import_statements, development

@videlec

This comment has been minimized.

@videlec videlec changed the title import_statementss combined with search_def improve import_statements Jan 27, 2013
@videlec
Copy link
Contributor

videlec commented Jan 28, 2013

comment:2

Now, all function in the module are documented...

@nthiery
Copy link
Contributor

nthiery commented Feb 28, 2013

Reviewer: Nicolas M. Thiéry

@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor

nthiery commented Feb 28, 2013

comment:3

Attachment: trac_12543-import_statements-vd.patch.gz

I did some improvements with Vincent watching over my shoulder.

Positive review! Thanks Vincent :-)

@jdemeyer
Copy link

jdemeyer commented Mar 4, 2013

Merged: sage-5.8.beta3

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

4 participants