Re: Rant (was Re: x*x if x>10

2008-07-27 Thread DaveM
On Sun, 27 Jul 2008 19:46:32 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >As a rule of thumb, don't return objects you didn't create inside a >function from scratch. I wish I'd had that advice when I started learning python. It would have sav

Re: Rant (was Re: x*x if x>10

2008-07-27 Thread DaveM
]) >[1, 2, 3, 4, 5, 6, 7, 8, 9] Ah. I had no luck with sum, but I hadn't realised it needed the "[]" term. I must read about it again. >It doesn't get any easier than that. Not only that, but it's exactly what I was after - and fastest, too, although speed isn't really an issue. Thank you. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Rant (was Re: x*x if x>10

2008-07-27 Thread DaveM
in this situation: a = [1,2,3] def foo(x): do_something_with_x return x ... Then when I call foo(a), a gets changed. It just isn't the effect I expect from changing a local. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Rant (was Re: x*x if x>10

2008-07-27 Thread DaveM
On Sun, 27 Jul 2008 16:57:14 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >Marc 'BlackJack' Rintsch schrieb: >> On Sun, 27 Jul 2008 16:41:19 +0200, Diez B. Roggisch wrote: >> >>> DaveM schrieb: >>>> Getting back to the

Rant (was Re: x*x if x>10

2008-07-27 Thread DaveM
d fastest by a trivial amount, I can't remember which). Along the way, I must have tried/used half a dozen methods, ...which brings me back my initial PERL comment. There's more than one way to do it in Python, too. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread DaveM
On Mon, 21 Jul 2008 03:18:01 +0200, Michiel Overtoom <[EMAIL PROTECTED]> wrote: >Many major text/word processing programs (Emacs, vi, MS-Word) are also >written in C. I thought Emacs was written in Lisp. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: x, = y (???)

2008-07-17 Thread DaveM
On Thu, 17 Jul 2008 17:32:30 -0400, Terry Reedy <[EMAIL PROTECTED]> wrote: > >>> *x, = [3] > >>> x >[3] What does *x signify? DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: can Python be useful as functional? (off topic)

2007-09-19 Thread DaveM
ly if we replace 'philosopher' by 'man' >and 'attractive lady' by 'woman'. The version I prefer has the woman asking, "What sort of woman do you take me for?" DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Spell-checking Python source code

2007-09-08 Thread DaveM
On Sat, 08 Sep 2007 14:04:55 -0700, John Zenger <[EMAIL PROTECTED]> wrote: > In an ideal world, my IDE would do this with a red wavy line. I can't help with your problem, but this is the first thing I turn off in Word. It drives me _mad_. Sorry - just had to share that.

Re: list index()

2007-08-31 Thread DaveM
and _bot_ the same way, too? No - but I would pronounce "lever" and "fever" the same way, if that helps. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Who uses Python?

2007-06-04 Thread DaveM
nalytics? SEO? Digital art? I'm a hobbyist. No, that's not right - I run a course and I learnt the language writing a program to allocate tutors and students to tutorial groups over a three day course I run. I don't know what that makes me - and, no, I don't want any helpful answers! DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: invert or reverse a string... warning this is a rant

2006-10-23 Thread DaveM
sent? Wow. Maybe I have thicker skin than you, or perhaps you're a professional whose self-worth has been damaged, but I would have been grateful for that critique, not angry. To each his own, I suppose. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: does anybody earn a living programming in python?

2006-09-30 Thread DaveM
ematically, any finite integer is able to be >counted, so "countless" is equivalent to "infinite in number". While we're being pedantic, there are many more ways to be "too many to count" than infinity. Counting is a physical process that depends as much on the

Re: beginner code problem

2006-06-02 Thread DaveM
On Fri, 2 Jun 2006 18:41:53 -0400, RJ <[EMAIL PROTECTED]> wrote: > I'm trying to teach myself Python (probably running into the old dog >new tricks issue) and I'm trying to start with the very basics to get a >handle on them. > > I'm trying to write code to get the computer to flip a coin 100

Re: Python compiler

2006-03-17 Thread DaveM
On Thu, 16 Mar 2006 13:34:14 +0100, "Méta-MCI" <[EMAIL PROTECTED]> wrote: >Après, vous pourrez aussi fréquenter le newsgroup : >fr.comp.lang.python >qui a l'avantage d'être en français. But perhaps he's a Flemish speaker - are you trying to start a

Re: 2.4.2 + Zone Alarm

2006-02-23 Thread DaveM
ythonw.exe still running and terminating the process allows IDLE to start normally. Easier than rebooting. PythonWin doesn't suffer this problem, btw. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: Global variables, Classes, inheritance

2006-02-06 Thread DaveM
Thanks very much for the help to all who replied. I'd completely missed the difference between: class Foo: i = 12345 a = Foo() b = Foo() a.i = 678 and Foo.i = 678 Yeah, I know... DaveM -- http://mail.python.org/mailman/listinfo/python-list

Global variables, Classes, inheritance

2006-02-03 Thread DaveM
. What's the difference between the following?: class Foo: i = 12345 ... class Foo: self.i = 12345 ... class Foo: def __init__(self): self.i = 12345 ... class Foo: def __init(self): i = 12345 ... DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-04 Thread DaveM
etty much match the qualification numbers. Sure, which HO post you get can give your career a head start, but that advantage is evanescent if you can't cut the mustard. Fouling your career by upsetting the wrong people is, OTOH, easy to do. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Sorting dominoes

2005-11-13 Thread DaveM
m sure I'll work out an effective algorithm eventually, but I suspect I'm re-inventing the wheel, so any hints on the best way to tackle this would be appreciated! DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread DaveM
nd "his or her" is "PC" (and therefore a great sin ;-) ). Working in a hospital, it always jars when a patient of unknown sex is referred to as "It". I always use they/them/their, so it's not unique to Texas. DaveM -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-06 Thread DaveM
On Fri, 07 Oct 2005 00:33:43 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-10-06, DaveM <[EMAIL PROTECTED]> wrote: > >>>Frankly, I can't watch Shakespeare or movies like "the full >>>monty" or "trainspotting" because I can&#

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-06 Thread DaveM
sh to me for the most part. Not just you. It always amuses me in trips to the US that British voices (outside of the movies) are often subtitled, while first-generation Americans whose English is. um, limited, are not. Try pretending the British accents are from naturalised US citizen