On Tue, Jan 3, 2012 at 10:15 AM, Andy Ray Terrel <[email protected]> wrote:
> On Tue, Jan 3, 2012 at 10:34 AM,  <[email protected]> wrote:
>>> On Thu, Dec 22, 2011 at 1:12 AM, Joachim Durchholz <[email protected]>
>>> wrote:
>>>> Am 22.12.2011 03:08, schrieb Alexey U. Gudchenko:
>>>>> Note that there is a REP 3107 for the type checking (It is stalled
>>>>> though):
>>>>>
>>>>> http://markmail.org/message/onxlt4t5mjqkls6k?q=thread:pruvsejfjvarfodk
>>>>
>>>>
>>>> That's for Python 3, so it's not going to help us as long as we're based
>>>> on 2.x.
>>>
>>> Annotations can be used in Python 2.  You just have to set them
>>> manually with __annotations__ instead of using the special syntax.
>>
>> A right, I overlooked that.
>>
>>>>> In particular there exist an old third side module (2006 last updated,
>>>>> overgrown with the other functionality a little, though):
>>>>>
>>>>> http://oakwinter.com/code/typecheck/tutorial/basics.html
>>>
>>> A third party type checking module already exists; it's called traits.
>>> But this is way beyond the scope of what you are trying to do here.
>>
>> Heh. What traits can do looks really, really nice.
>>
>> I have taken a short look at the internals.
>> I identified a few strings attached: external NumPy dependency, C code,
>> large LoC count, outside the pure math interest that motivates SymPy
>> coders.
>>
>> My preliminary estimate is that it's not useful enough for SymPy to make
>> it worth the effort and risk.
>
> Traits is a lot more than just type checking and if that is all you
> want I wouldn't recommend it. It should really be thought of as a
> large number of programming patterns, many of which are targeted
> towards GUI programming.

IPython has simple pure Python Traits implementation if needed. It is
perfectly reusable, and independent, see the file:
IPython/utils/traitlets.py

>
> On a personal note, I have yet to write a Traits code that didn't hit
> some bug in Traits that I had to work around.  It's just not tested or
> supported very well.

I tried to dig into the core of ETS traits, and it was quite
complicated to my taste. But I like the IPython Traits, it's really
simple inside. Obviously, it's only a subset of Traits, but the API
should be equivalent.

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