Lisandro wrote: > I've almost finished the transform in charge of embeding functions > signatures in docstrings. I want to ask your about some issues I need > to handle to finish it. > > * Position in the transform pipeline: I'm curently inserting the > auto-signature transform after the 'ResolveOptions' one in the > transform pipeline. Dag, tell me if this is OK.
For this, anywhere where you have the needed information available is ok. I guess you read the type info from nodes then, and not the "parsed" info that is available later? (that could make sense and is not necesarrily a bad sign) > * Remove identation?: What do you thing about previously call > 'textwrap.dedent()' on the original function docstring if it is > present? Do you believe there ar use cases for preserving the common > level of identation in docstrings? If docstrings are not 'dedented' > (Do such word exists?), then we are going to be carefull about the > other option '--embed-positions', that do not take into account > docstring identation. -1. An aim is as high degree of Python compatability as possible, and dedenting automatically would mean less Python compatability (without any really good reason). Taking the inverse approach seems better: Scan for common indentation and insert that prior to the signature you are inserting. Remember that some issues/features (like any issues with indendation) can just be left for later though; "release early, release often!". I don't have an opinion about the rest. > All my current implementation lives in two scripts: one monkeypatching > Cython, and other for Epydoc. If any of you want to give a try before > pushing this in cython-devel, just let me know, I'll send the scripts. Perhaps attach patches to the ticket and ping the list when the issues above is sorted out? If you don't like working on a hg clone, have you looked at the hg "queue" functionality for creating, pushing and popping patches? Then you don't need a script. (Just a tip.) Open question: Do you plan to submit a patch to epydoc (would they even consider Cython support?), or is it something that should be shipped with Cython somehow? Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
