From: Lie Ryan on
On 12/5/2009 4:18 PM, Steven D'Aprano wrote:
>> Tree is better than Graph
>>
>> not having Tree and Graph package in the standard library force most
>> people to find List-based solution.
>
> If you have to be *forced* to use a list-based solution, that's a good
> sign that a list is *not* the right tool for the job.

Sorry for putting too much emphasis on the "forced", that wasn't my
intention. I was mentioning that often simple problems appeared more
complex because the person was thinking in a higher level data structure
than is necessary. "forced" in that sentence means to let people to
think a little bit harder with list/dict before deciding that they are
unsuitable and moving to a tree or a graph.
From: geremy condra on
On Sat, Dec 5, 2009 at 7:06 AM, Lie Ryan <lie.1296(a)gmail.com> wrote:
> On 12/5/2009 4:18 PM, Steven D'Aprano wrote:
>>>
>>> Tree is better than Graph
>>>
>>> not having Tree and Graph package in the standard library force most
>>> people to find List-based solution.
>>
>> If you have to be *forced* to use a list-based solution, that's a good
>> sign that a list is *not* the right tool for the job.
>
> Sorry for putting too much emphasis on the "forced", that wasn't my
> intention. I was mentioning that often simple problems appeared more complex
> because the person was thinking in a higher level data structure than is
> necessary. "forced" in that sentence means to let people to think a little
> bit harder with list/dict before deciding that they are unsuitable and
> moving to a tree or a graph.

In any event, I think we can agree that for some tasks (I would say
many) a graph or tree is the most suitable data structure. To me,
that says that we need to be having a discussion about whether to
include those tools in the standard library, and how best to do so if
that's the decision. Would you agree?

Geremy Condra
From: Raymond Hettinger on
[geremy condra]
> I actually considered using dependencies as an example on the
> "graphine for pythonistas"[1] article, but decided to do the maze
> run instead. In any event, the uses of graphs in general computing
> are well enough established that I don't really think that's where
> the majority of the difficulty in coming up with something for the
> standard library will be- deciding how it should look and behave,
> especially in terms of scope and target audience, that's going to
> be the difficult part.

Right you are :-)


> [1]:http://gitorious.org/graphine/pages/GraphineForPythonistas

Do you have many users?


Raymond

From: geremy condra on
On Sat, Dec 5, 2009 at 4:39 PM, Raymond Hettinger <python(a)rcn.com> wrote:
> [geremy condra]
>> I actually considered using dependencies as an example on the
>> "graphine for pythonistas"[1] article, but decided to do the maze
>> run instead. In any event, the uses of graphs in general computing
>> are well enough established that I don't really think that's where
>> the majority of the difficulty in coming up with something for the
>> standard library will be- deciding how it should look and behave,
>> especially in terms of scope and target audience, that's going to
>> be the difficult part.
>
> Right you are :-)
>
>
>> [1]:http://gitorious.org/graphine/pages/GraphineForPythonistas
>
> Do you have many users?

I literally have no idea, but I suspect not, seeing as how its a
pure python3 project. I get emails about it often enough that
I suspect we have about a hundred or so, though, which I'm
not unhappy with for a project that focuses on so basic a
data structure. Having said that, we always welcome more-
and I'd love to have your input on how to make its api more
pythonic.

Geremy Condra
From: Raymond Hettinger on
On Dec 5, 3:22 pm, geremy condra <debat...(a)gmail.com> wrote:
> On Sat, Dec 5, 2009 at 4:39 PM, Raymond Hettinger <pyt...(a)rcn.com> wrote:
> > [geremy condra]
> >> I actually considered using dependencies as an example on the
> >> "graphine for pythonistas"[1] article, but decided to do the maze
> >> run instead. In any event, the uses of graphs in general computing
> >> are well enough established that I don't really think that's where
> >> the majority of the difficulty in coming up with something for the
> >> standard library will be- deciding how it should look and behave,
> >> especially in terms of scope and target audience, that's going to
> >> be the difficult part.
>
> > Right you are :-)
>
> >> [1]:http://gitorious.org/graphine/pages/GraphineForPythonistas
>
> > Do you have many users?
>
> I literally have no idea, but I suspect not, seeing as how its a
> pure python3 project.

Google's code search can provide a clue.
It is also helpful because it let you see
typically use cases and whether the API fits well
or whether it is awkward to express common use cases.
All of those observations will help you tweak the API.

Also, it's useful to make similar studies of competing
packages either written in Python or in some other langauge.


Raymond