Steven D'Aprano wrote:
> On Thu, 13 Mar 2008 22:37:00 -0500, "Andrew Rekdal" wrote:
>
>> Seems 'KEYBOARDS' works nicely
>
> in reply to a post from "jcnbp8k" who wrote:
>
>>> That's easy solved, the word is keyboards.
>
> Hmmm... using my incredible powers of deduction, I predict that the word
On Thu, 13 Mar 2008 22:37:00 -0500, "Andrew Rekdal" wrote:
> Seems 'KEYBOARDS' works nicely
in reply to a post from "jcnbp8k" who wrote:
> > That's easy solved, the word is keyboards.
Hmmm... using my incredible powers of deduction, I predict that the word
is "keyboards".
--
Steven
--
http
good at that sort of thing, but would love to know the
>> answer
>> to this one.
>>
>> Thank you,
>> Patty
>> [EMAIL PROTECTED]
>>
>>
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
> --
> View this message in context:
> http://www.nabble.com/sorting-question-tp16041301p16043041.html
> Sent from the Python - python-list mailing list archive at Nabble.com.
>
--
http://mail.python.org/mailman/listinfo/python-list
hat sort of thing, but would love to know the answer
> to this one.
>
> Thank you,
> Patty
> [EMAIL PROTECTED]
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
View this message in context:
http://www.nabble.com/sorting-question-tp16041301p16
The website you list regarding 9-letter scrambled words doesn't exist any
longer. Is there another way that I can access it to see your program you
designed? I have a nine letter work I need to unscramble. I will send it just
in case you can figure it out for me and let me know.
KAEOSYBR
belinda thom wrote:
> Hi,
>
> I've had a look at http://wiki.python.org/moin/HowTo/Sorting, but am not
> sure if I can get the operator.itemgetter to do what I want for my
> particular need. I'm also not sure why creating my own cmp for pulling
> tuple parts out and passing it to a list sort do
Hi,
I've had a look at http://wiki.python.org/moin/HowTo/Sorting, but am
not sure if I can get the operator.itemgetter to do what I want for
my particular need. I'm also not sure why creating my own cmp for
pulling tuple parts out and passing it to a list sort doesn't just work.
I'm sure th
> return [(node.id, node.ord_number) for node in self.get_path()]
I meant:
> return [(node.ord_number, node.id) for node in self.get_path()]
--
Ksenia
--
http://mail.python.org/mailman/listinfo/python-list
2005/8/10, Peter Otten <[EMAIL PROTECTED]>:
> I think you cannot get away with your first rule, but have to operate on the
> full path instead. Otherwise the position of inner nodes would sometimes be
> determined by their url and sometimes by their ord_number *during* *the*
> *same* *sort*.
Rrr.
Ksenia Marasanova wrote:
> I want to sort this list with the following rules:
> 1. The parent must always come before the children in the list
> 2. Nodes with the same parent must be sorted by 'ord_number'
>
> The first rule is easy, cause I can use 'url' for it. List with nodes
> is coming from
Example of the wrong sort:
class Node:
def __init__(self, name, url, order, pid, id):
self.name = name
self.url = url
self.order = order
self.pid = pid
self.id = id
def __repr__(self):
return '%s [order: %s]' % (self.url, self.order)
def
> class Node:
> def __init__(self, name, url, order, pid, id):
> self.name = name
> self.url = url
> self.order = order
> self.pid = pid
> self.id = id
> def __repr__(self):
> return self
Ksenia Marasanova wrote:
> Hi,
>
> I have a list that contains nodes from a tree. Each node is a class
> instance, but I'll use dictionary here to simplify the example.
> So the list looks like this:
> [
> {'id': 1,
> 'name': 'Parent node',
> 'ord_number': 1,
> 'parent_id': 0,
> 'url': '/parentnod
Hi,
I have a list that contains nodes from a tree. Each node is a class
instance, but I'll use dictionary here to simplify the example.
So the list looks like this:
[
{'id': 1,
'name': 'Parent node',
'ord_number': 1,
'parent_id': 0,
'url': '/parentnode/'},
{'id': 2,
'name': 'My node',
'ord_number'
14 matches
Mail list logo