On 10/17/07, Pierre <[EMAIL PROTECTED]> wrote:
> or the load command could exactly replace import, so that
>
> load foo
>
> would load foo.sage in the namespace foo after preparsing, while the
> current behavior of load would be achieved by
>
> from foo load *
>
> And "load foo as bar" would work as well. (I don't know if foo should
> be replaced by foo.sage thoughout, can't decide)
>
> The problem is that people are used to the current syntax of load...
> perhaps what you are suggesting is better. Personally i would find
> either way very easy to remember. What would students prefer ? i don't
> use sage to teach (yet!), but i suppose it's important. I'm guessing
> that creating a new namespace (by default) would prevent them from
> making silly mistakes.
Let's wait and see what/if this discussion generates any further
discussion in this thread by people other than you and me.
If so, then it would make sense to do a rewrite of the commands.
FYI, the current load command works like the load command in
Magma, which is what I was very used to using when I started
Sage, and which I missed. It -- coupled with the attach command --
provide different functionality than import.
By the way, if foo is a file and you do
load foo.sage
you can then do
import foo
and get foo in a namespace. This is because typing foo.sage
creates a file foo.py with the preparsing done.
William
William
--~--~---------~--~----~------------~-------~--~----~
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-forum
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---