On Fri, May 30, 2008 at 11:57 PM, Kirill Smelkov
<[EMAIL PROTECTED]> wrote:
>
> On Tue, May 27, 2008 at 10:53:23PM +0200, Ondrej Certik wrote:
>>
>> Hi,
>>
>> I think we should know allow using implicit imports in the sympy code
>> as I think it only makes debugging harder because you don't know where
>> the symbols are comming from.
>> We discussed this on the mpmath mailinglist:
>>
>> http://groups.google.com/group/mpmath/msg/d97f4b9e195b77a3
>>
>> where Fredrik used the argument:
>>
>> > This is a good convention generally, but not really necessary to
>> > follow when there's a small number of well isolated modules. The fact
>> > that mpmath uses import * internally doesn't mean sympy has to. I
>> > think any code in sympy that uses mpmath should import explicitly.
>>
>> which I found reasonable, so I didn't pursue this issue further. But
>> now the problem with it has popped up in this issue:
>>
>> http://code.google.com/p/sympy/issues/detail?id=864
>>
>> had we used explicit imports in mpmath, the error message would be
>> more clear, as python would shout at the import time that he cannot
>> import it or something. Does anyone have some good arguments for ever
>> using implicit imports? I think it is necessary even for a small set
>> of isolated modules.
>
> I think implicit imports like "from numpy import *" are handy for
> interactive sessions.
>
> But for source code I too prefer using explicit imports because it is
> then much clearer (say e.g. after several months) what gets from where.
>
> Explicit is better than implicit after all :)

What do you think Fredrik? Let's use explicit in mpmath as well, at
least in SymPy?

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to