A comp.lang.python code snippet archive?
python-list at teleo.net
Tue Feb 29 11:41:31 EST 2000
[Adrian Eyre, on Tue, 29 Feb 2000]
:: >> #snippet "mysnippet.py"
:: >> #category "Networking"
:: >> #description "This does something interesting"
:: >> #begin
:: >> #!/usr/bin/env python
:: > Nice thought, but I don't think it will work. Well, technically: yes. But
:: > I think many people are just like me in this respect: I will not always
:: > remember to do this.
:: Surely we don't intend to archive *all* snippets in c.l.py. Only ones that
:: are meaningful out of the context of the posting, and are useful/reuseable.
:: The author of the snippet can decide whether this is the case, and only use
:: the above notation if they want it to be included in the archive.
Surely, a growing, categorized repository of working code snippets
benefits the community. This past week alone, numerous people have
asked for simple example code to get them started on a project.
A good deal of this could be automated, if the plan to reimplement
www.python.org in Zope happens.
To use www.zope.org as an example, a contributor simply signs up as
member, then adds content through a form, which can then live in
her/his member directory, much like starship, or in a central directory.
This "formalizes" the gathering of subject category, attribution
fields and so forth, taking the onus off the contributor to remember
Thus it has become commonplace for Zope contributors to answer a query
on the list by saying "I've posted a [Example, Tip, How-To, External
Method, ZClass, Product] to the Web site at [URL]." Or when someone
posts something useful to the list, commonly someone will suggest
"put in on the Web site." Due to this division of labor, there are now
hundreds of such contributions and the index is growing quickly.
Submittals could pass to a mailing list method as as part of the
process. People could subscribe and receive automated announcements
whenever something new was added. Interested parties could review the
code and pass bug reports directly to the author.
More information about the Python-list