Am 06.03.2015 um 23:12 schrieb Aaron Meurer:
So one of your suggestions is probably the best fix. Your suggestion 2 (or 3, I don't see the difference) sounds like the best plan to me.
The plan was to have 2: Set up S.Whatever but delay instance creation, and 3: delay S.Whatever creation. Somehow things got mixed up while I wrote the suggestions. Right now I think it doesn't matter to callers so it's not important which of the two it will be.
> It
will break down if something at import time calls S.Whatever, but that should be avoided anyway.
Ack.
Even so, I'm still not a fan of evalf() being called inside a class constructor. Pervasive use of evalf is one of the reasons SymPy is slow.
I can see that, but calling evalf() inside a singleton's constructor should be okay, by the definition of "singleton".
Originally, I was a bit scared at the prospect of adding delayed attribute initialization to S. However, some more investigation turned up a route that I feel confident with, so I'll try that.
-- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/54FAB1C6.9060605%40durchholz.org. For more options, visit https://groups.google.com/d/optout.