On Thu, Dec 4, 2008 at 1:19 PM, Hendrik van Rooyen [EMAIL PROTECTED]wrote:
Cameron Laird [EMAIL PROTECTED] wrote:
There's a realm within Pythonia that favors lambdalessness.
And who, may I ask, Is the King of this realm?
- Hendrik
--
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
--
http://mail.python.org/mailman/listinfo/python-list
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
[EMAIL PROTECTED] wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting
from the future.
So? Maybe he is. What's your problem?
/W
--
My real email address is constructed by swapping the domain with the
recipient (local part).
Steven D'Aprano stev..urce.com.au wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
I always knew I was more advanced than other people...
:-)
Well spotted!
Thanks
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Andreas Waldenburger [EMAIL PROTECTED]
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
[EMAIL PROTECTED] wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting
from the future.
So? Maybe he is. What's your problem?
It was probably playing hob with his threading
Steven D'Aprano wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting from
the future.
further evidence of the Guido's time-machine[1]. For the secret
cabal of core developers who borrow the time-machine, I recommend
not sending email from within it. :)
-tkc
[1]
On Thu, 4 Dec 2008 06:40:02 +0200 Hendrik van Rooyen
[EMAIL PROTECTED] wrote:
Andreas Waldenburger [EMAIL PROTECTED]
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano
[EMAIL PROTECTED] wrote:
Hendrik, I think your PC's clock is wrong. You seem to be posting
from the future.
So?
Cameron Laird wrote:
def f1(Match):
return
Something missing here?
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
Cameron Laird wrote:
def f1(Match):
return
Something missing here?
Ugh; yes, sorry:
def shell_escape(Arg) :
returns Arg suitably escaped for use as a command-line argument
to Bash.
In message [EMAIL PROTECTED], Cameron Laird wrote:
def shell_escape(Arg) :
returns Arg suitably escaped for use as a command-line argument
to Bash.
pattern = r['\|\\$\#\;\(\)\[\]\{\}\`\!\~\ \\]
def f1(Match):
return \\ + Match.group(0)
return
On Wed, Dec 3, 2008 at 6:23 AM, Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
So why is that better?
--
http://mail.python.org/mailman/listinfo/python-list
I personally think that it looks marginally cleaner (indentation issues
aside).
Do you think it's substantially worse? If so, why?
I
Hi,
what about numpy?
import numpy
a = numpy.ones((10,),dtype=numpy.bool)
I = [1,3,8]
a[I]=False
print a
gives: [ True False True False True True True True False True]
Almar
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED], Cameron Laird wrote:
def shell_escape(Arg) :
returns Arg suitably escaped for use as a command-line argument
to Bash.
pattern =
In message [EMAIL PROTECTED], Cameron Laird wrote:
There's a realm within Pythonia that favors lambdalessness.
Why is that? Was Rossum frightened in his cradle by a lambda when he was a
baby? Are some people afraid of lambdas the way others are afraid of
spiders?
--
On Dec 4, 1:52 pm, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
Why is that? Was Rossum frightened in his cradle by a lambda when he was a
baby? Are some people afraid of lambdas the way others are afraid of
spiders?
Language designers are a superstitious and cowardly
Cameron Laird [EMAIL PROTECTED] wrote:
There's a realm within Pythonia that favors lambdalessness.
And who, may I ask, Is the King of this realm?
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
In message [EMAIL PROTECTED], Cameron Laird wrote:
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
Cameron Laird wrote:
I've been trying to decide if there's any sober reason to advocate
the one-liner
map(lambda i: a.__setitem__(i, False), [x1, x2, x3,
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED], Cameron Laird wrote:
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
Cameron Laird wrote:
I've been trying to decide if there's any sober reason to advocate
In article [EMAIL PROTECTED],
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
Cameron Laird wrote:
I've been trying to decide if there's any sober reason to advocate
the one-liner
map(lambda i: a.__setitem__(i, False), [x1, x2, x3, ..., x1024])
Are lambdas like the Dark Side of Python?
On Nov 17, 7:41 pm, Tim Chase [EMAIL PROTECTED] wrote:
It doesn't matter as none of this is valid Python. In Python you have to
write
array[x1] = False
array[x2] = False
Uh...not so much...
a = [1,2,3,4,5]
x1, x2 = 1, 3
a[x1] = a[x2] = False
a
[1, False, 3, False, 5]
On Nov 25, 11:29 am, Iain King [EMAIL PROTECTED] wrote:
On Nov 17, 7:41 pm, Tim Chase [EMAIL PROTECTED] wrote:
It doesn't matter as none of this is valid Python. In Python you have to
write
array[x1] = False
array[x2] = False
Uh...not so much...
a = [1,2,3,4,5]
x1,
Cameron Laird wrote:
I've been trying to decide if there's any sober reason to advocate
the one-liner
map(lambda i: a.__setitem__(i, False), [x1, x2, x3, ..., x1024])
Are lambdas like the Dark Side of Python?
:)
--
http://mail.python.org/mailman/listinfo/python-list
jzakiya [EMAIL PROTECTED] wrote:
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
Answer: it does not matter. This is premature
On Nov 17, 2:54 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
In article [EMAIL PROTECTED],
Tim Chase [EMAIL PROTECTED] wrote:
.
.
.To the OP, I think rather than cluttering my code,
I'd just
create a loop
for i
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
1)
array[x1]=array[x2]== array[x10] = \
array[x11]=array[x12]=... = array[x20]
jzakiya [EMAIL PROTECTED] writes:
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
1)
array[x1]=array[x2]== array[x10] =
On Nov 17, 2:10 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
jzakiya [EMAIL PROTECTED] writes:
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or
Arnaud Delobelle wrote:
jzakiya [EMAIL PROTECTED] writes:
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
1)
It doesn't matter as none of this is valid Python. In Python you have to
write
array[x1] = False
array[x2] = False
Uh...not so much...
a = [1,2,3,4,5]
x1, x2 = 1, 3
a[x1] = a[x2] = False
a
[1, False, 3, False, 5]
Works for me.
To the OP, I think rather than cluttering my code, I'd
Arnaud Delobelle [EMAIL PROTECTED] writes:
jzakiya [EMAIL PROTECTED] writes:
I looked online and in books, but couldn't find a definitive answer to
this.
I have an array and set multiple elements to either True or False at
one time.
Question: Which way is faster (or does it matter)?
1)
In article [EMAIL PROTECTED],
Tim Chase [EMAIL PROTECTED] wrote:
.
.
.
To the OP, I think rather than cluttering my code, I'd just
create a loop
for i in [x1,x2,x3,x4,...x1024]:
a[i] = False
31 matches
Mail list logo