On Tue, May 19, 2009 at 10:36 PM, P.J. Eby <p...@telecommunity.com> wrote: > > Now, about the APIs... > > I think it would be simpler to have explicit object types representing > things like a directory, a collection of directories, and individual > projects, and these object types should be part of the API. > > Any function-oriented API should just be exposed as the methods of a default > singleton. Other Python modules follow this pattern -- and it's what I > copied for the pkg_resources design. It gives a nice tradeoff between > keeping the simple things simple, and complex things possible, as well as > keeping mechanism and policy separate. > > Right now, the API design you're trying to do is being burdened by using > strings and tuples to represent things that could just as easily be objects > with their own methods, instead of things you have to pass back into other > APIs. This also makes caching more complex, because you can't just have one > main object with stuff hanging off; you've got to have a bunch of > dictionaries, tuples, lists, sets, etc.
I don't know how other people work on building APIs in PEPs, but at this stage I am unable to work them on the paper, without having a prototype to try things out. So I guess I'll start this prototype in bitbucket and come back with it for feedback in Distutils-SIG, for a new PEP 376 round. Tarek -- Tarek Ziadé | http://ziade.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com