Nikita Nemkin, 26.04.2013 13:33:
> On Tue, 23 Apr 2013 10:19:15 +0600, Robert Bradshaw wrote:
> 
>> Jumping into this thread late, improvements (1) and (3) certainly seem
>> beneficial. As far as documenting "attributes," I can't see much of a
>> use, but the downsides seem are low enough (accidentally assigning a
>> stray string to the previously declared attribute) and the
>> implementation non-invasive enough that I'm +0.5 for this change. It
>> doesn't introduce new syntax or behavior, just additional semantic
>> meaning for those (otherwise unlikely to occur) strings and sure beats
>> writing them out as properties (though the fact that cdef attributes
>> are properties should be considered more of an implementation detail
>> IMHO).
> 
> I've just found a 4 year old ticket requesting the same feature (2):
> http://trac.cython.org/cython_trac/ticket/206

Just because there's a ticket doesn't mean that it should be fixed, but
I'll give in on this one. Nikita, if you add the test that proves that
newlines prevent a subsequent string from becoming a docstring, i.e. that

    cdef attr

    "this is not a docstring"

behaves as expected and is different from

    cdef attr
    "this is a docstring"

I'll merge your pull request.

Stefan

_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to