#17847: Cython: embed signatures in docstrings
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.6
      Component:  cython             |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  Fixed upstream,    |  Work issues:
  but not in a stable release.       |       Commit:
         Branch:                     |  1a36cc96d1e9ebd5d46a3dd9c027a41e89da2ebc
  u/jdemeyer/ticket/17847            |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 Note that the following crashes:
 {{{
     sage: class Foo:
     ....:     def __init__(self):
     ....:         'docstring'
     ....:         pass
     sage: import inspect
     sage: inspect.getsource(Foo)
 }}}
 That's strange, since it is all pure Python, and since
 {{{
 sage: inspect.getsource(Foo.__init__)
 }}}
 works.

 Even more strange: In `getsource(Foo.__init__)`, the whole source of `Foo`
 is determined. Hence, it ''it'' possible to get the source of `Foo`.
 That's a bug in Python's inspect.getsource.

 I wonder if we should fix that. Certainly not here, though.

--
Ticket URL: <http://trac.sagemath.org/ticket/17847#comment:31>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to