On Sat, Apr 16, 2011 at 4:37 PM, cool-RR <[email protected]> wrote:

> On Sat, Apr 16, 2011 at 8:40 AM, Tal Einat <[email protected]> wrote:
>
> Then perhaps such metadata shouldn't be kept in __init__.py in the first
>> place?
>
>
> 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.

- Tal
_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

לענות