[Python-il] Statically analyzing a Python module to find assignments
taleinat at gmail.com
Sat Apr 16 16:50:03 IDT 2011
On Sat, Apr 16, 2011 at 4:37 PM, cool-RR <cool-rr at cool-rr.com> wrote:
> On Sat, Apr 16, 2011 at 8:40 AM, Tal Einat <taleinat at gmail.com> wrote:
> Then perhaps such metadata shouldn't be kept in __init__.py in the first
> That would definitely be an easy solution: Tell simpack writers to have a
> file "metadata.txt" or whatever. But I find it less elegant. I believe that
> almost every Python package (or module or function or class) should have a
> docstring, so if I'll have to maintain the simpack description in both
> places (docstring and "metadata.txt"), I'll be breaking DRY.
> Also, people who are not experienced with distutils may have to spend some
> "quality time" with it to make it package the "metadata.txt" file with their
> code. As Guido said, "I'd like not to have such a newbie trap lying around."
Then perhaps have them write the metadata in a metadata.py file, and
execfile it in __init__.py? Then you can just execfile the metadata.py file
if you want just the metadata.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-il