[Baypiggies] keeping cpy extension docs in sync with the native implementation
Brian Harring
ferringb at gmail.com
Sat Jul 31 01:53:45 CEST 2010
Curious, how do y'all manage to keep your docstrings for extension
in sync with your native implementation? Specifically, say
you've got 'module.submodule.some_class' , which will be
'module._cpython_extension.kls' if the extensions are enabled, and
'module.submodule.native_implementation' if not, how do you keep your
literal __doc__ in sync?
This pattern is semi common if you're not requiring extensions, but
want to use the extension if it's available (for speed reasons)- a
real world example would be
http://www.pkgcore.org/trac/pkgcore/browser/ferringb/snakeoil-sphinx/snakeoil/caching.py
So the question is, how do y'all keep the docstrings in sync?
Personally I'd rather not be stuck trying to keep the docstrings in
two places perfectly in sync, but I'm not aware of anything better.
Thoughts/suggestions?
~brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20100730/8ed86f0b/attachment.pgp>
More information about the Baypiggies
mailing list