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
])
>[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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
. 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
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
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
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
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
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
23 matches
Mail list logo