Re: Strange sorting error message

2006-10-06 Thread Steve Holden
Dustan wrote:
 Neil Cerutti wrote:
 
On 2006-10-05, Dustan [EMAIL PROTECTED] wrote:

Steve Holden wrote:

Dustan wrote:

I'm hiding some of the details here, because I don't want to
say what I'm actually doing.
[...]

I have the answer to your problem but I don't actually want to
tell you what it is.

That's great, seeing as I already figured out the answer, as I
have already posted in a reply.

I had a good laugh at it.


Are you saying I broke one of these rules?
http://www.catb.org/~esr/faqs/smart-questions.html
Or are you just being plain rude?
A lack of a response from you implies the latter...

SPOILER SPACE

It was a joke, based on you hiding what you are doing, he decided
to hide the solution to your problem. Get it?
 
 
 Ah, now I get it... Well, not really. I'm not outgoing, so it's hard
 for me to spot a joke when I see one.
 
Even when it smacks you in the face, apparently. Anyway, I'm sorry if 
you thought I was getting at you in any way. Just trying to amuse the 
group ...

regards
  Steve
-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd  http://www.holdenweb.com
Skype: holdenweb   http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-06 Thread Fredrik Lundh
Steve Holden wrote:

 Even when it smacks you in the face, apparently. Anyway, I'm sorry if 
 you thought I was getting at you in any way. Just trying to amuse the 
 group ...

time to reinstate mandatory use of the wink tag ?

/F

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-06 Thread hanumizzle
On 10/5/06, Neil Cerutti [EMAIL PROTECTED] wrote:

 It was a joke, based on you hiding what you are doing, he decided
 to hide the solution to your problem. Get it?

What if it was for a proprietary software of some kind?

-- Theerasak
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-06 Thread Neil Cerutti
On 2006-10-06, hanumizzle [EMAIL PROTECTED] wrote:
 On 10/5/06, Neil Cerutti [EMAIL PROTECTED] wrote:

 It was a joke, based on you hiding what you are doing, he decided
 to hide the solution to your problem. Get it?

 What if it was for a proprietary software of some kind?

It wasn't sufficiently clear, hence the mild ribbing.

-- 
Neil Cerutti
The Rev. Merriwether spoke briefly, much to the delight of the
audience. --Church Bulletin Blooper 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-05 Thread Dustan

Steve Holden wrote:
 Dustan wrote:
  I'm hiding some of the details here, because I don't want to say what
  I'm actually doing.
  [...]

 I have the answer to your problem but I don't actually want to tell you
 what it is.

That's great, seeing as I already figured out the answer, as I have
already posted in a reply.

Are you saying I broke one of these rules?
http://www.catb.org/~esr/faqs/smart-questions.html
Or are you just being plain rude?
A lack of a response from you implies the latter...


 regards
   Steve
 --
 Steve Holden   +44 150 684 7255  +1 800 494 3119
 Holden Web LLC/Ltd  http://www.holdenweb.com
 Skype: holdenweb   http://holdenweb.blogspot.com
 Recent Ramblings http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-05 Thread Neil Cerutti
On 2006-10-05, Dustan [EMAIL PROTECTED] wrote:

 Steve Holden wrote:
 Dustan wrote:
  I'm hiding some of the details here, because I don't want to
  say what I'm actually doing.
  [...]

 I have the answer to your problem but I don't actually want to
 tell you what it is.

 That's great, seeing as I already figured out the answer, as I
 have already posted in a reply.

I had a good laugh at it.

 Are you saying I broke one of these rules?
 http://www.catb.org/~esr/faqs/smart-questions.html
 Or are you just being plain rude?
 A lack of a response from you implies the latter...

SPOILER SPACE

It was a joke, based on you hiding what you are doing, he decided
to hide the solution to your problem. Get it?

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-05 Thread Dustan

Neil Cerutti wrote:
 On 2006-10-05, Dustan [EMAIL PROTECTED] wrote:
 
  Steve Holden wrote:
  Dustan wrote:
   I'm hiding some of the details here, because I don't want to
   say what I'm actually doing.
   [...]
 
  I have the answer to your problem but I don't actually want to
  tell you what it is.
 
  That's great, seeing as I already figured out the answer, as I
  have already posted in a reply.

 I had a good laugh at it.

  Are you saying I broke one of these rules?
  http://www.catb.org/~esr/faqs/smart-questions.html
  Or are you just being plain rude?
  A lack of a response from you implies the latter...

 SPOILER SPACE

 It was a joke, based on you hiding what you are doing, he decided
 to hide the solution to your problem. Get it?

Ah, now I get it... Well, not really. I'm not outgoing, so it's hard
for me to spot a joke when I see one.

 
 -- 
 Neil Cerutti

-- 
http://mail.python.org/mailman/listinfo/python-list


Strange sorting error message

2006-10-03 Thread Dustan
I'm hiding some of the details here, because I don't want to say what
I'm actually doing.

I have a special-purpose class with a __cmp__ method all set up and
ready to go for sorting. Then I have a special class that is based on
the builtin type list (though I didn't actually inherit list; I
probably should). When I create an instance with 2 or more items, and
attempt to sort it, I get this strange error message:

 myList.sort()
Traceback (most recent call last):
  File console, line 1, in module
  File [listModulePath], line 239, in sort
self.listOfObjects.sort()
TypeError: an integer is required

The sort method's code is exactly what you see; it's a one-line method.

The only thing I can think of is the __cmp__ method is returning
something other than an integer, which it's not.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-03 Thread Diez B. Roggisch
Dustan schrieb:
 I'm hiding some of the details here, because I don't want to say what
 I'm actually doing.

 I have a special-purpose class with a __cmp__ method all set up and
 ready to go for sorting. Then I have a special class that is based on
 the builtin type list (though I didn't actually inherit list; I
 probably should). When I create an instance with 2 or more items, and
 attempt to sort it, I get this strange error message:
 
 myList.sort()
 Traceback (most recent call last):
   File console, line 1, in module
   File [listModulePath], line 239, in sort
 self.listOfObjects.sort()
 TypeError: an integer is required
 
 The sort method's code is exactly what you see; it's a one-line method.
 
 The only thing I can think of is the __cmp__ method is returning
 something other than an integer, which it's not.

Does stuffing the objects in a standard list and sorting them work? How 
does the __cmp__-method look like?

Diez

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-03 Thread Dustan

Diez B. Roggisch wrote:
 Dustan schrieb:
  I'm hiding some of the details here, because I don't want to say what
  I'm actually doing.

  I have a special-purpose class with a __cmp__ method all set up and
  ready to go for sorting. Then I have a special class that is based on
  the builtin type list (though I didn't actually inherit list; I
  probably should). When I create an instance with 2 or more items, and
  attempt to sort it, I get this strange error message:
 
  myList.sort()
  Traceback (most recent call last):
File console, line 1, in module
File [listModulePath], line 239, in sort
  self.listOfObjects.sort()
  TypeError: an integer is required
 
  The sort method's code is exactly what you see; it's a one-line method.
 
  The only thing I can think of is the __cmp__ method is returning
  something other than an integer, which it's not.

 Does stuffing the objects in a standard list and sorting them work? How
 does the __cmp__-method look like?

Whoops, I had created the variable returnValue in __cmp__, but
forgotten to return it. Now it works.

That was a dumb mistake; sorry for the trouble.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Strange sorting error message

2006-10-03 Thread Steve Holden
Dustan wrote:
 I'm hiding some of the details here, because I don't want to say what
 I'm actually doing.
 [...]

I have the answer to your problem but I don't actually want to tell you 
what it is.

regards
  Steve
-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd  http://www.holdenweb.com
Skype: holdenweb   http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list